File libwmf-0.2.8.4-fix.patch of Package libwmf

--- src/api.c
+++ src/api.c
@@ -156,6 +156,12 @@
 	}
 
 	API->write_data = 0;
+	
+	API->user_data = 0;
+	API->store.attrlist = 0;
+	API->store.count = 0;
+	API->store.max = 0;
+	
 
 	API->MetaHeader.pmh = &(API->PlaceableMetaHeader);
 	API->MetaHeader.wmfheader = &(API->Head);

--- src/extra/gd/gd.c
+++ src/extra/gd/gd.c
@@ -784,6 +784,7 @@
     }
   else
     {
+      p = gdImageGetPixel (im->tile, srcx, srcy);
       /* Allow for transparency */
       if (p != gdImageGetTransparent (im->tile))
 	{

--- src/extra/gd/gd.h
+++ src/extra/gd/gd.h
@@ -21,6 +21,7 @@
  * documentation. */
 
 #include <stdlib.h>
+#include <string.h>
 
 /* stdio is needed for file I/O. */
 #include <stdio.h>

--- src/player/record.h
+++ src/player/record.h
@@ -96,6 +96,7 @@
 	new_record.function = record->function;
 	new_record.size = 0;
 	new_record.parameter = 0;
+	new_record.position = 0;
 
 	if (index > record->size)
 	{	WMF_ERROR (API,"Bad record - unexpectedly short!");
 

openSUSE Build Service is sponsored by