File netpbm-10.26.44-pnmtopng-CAN-2005-2978.patch of Package netpbm

--- converter/other/pnmtopng.c
+++ converter/other/pnmtopng.c
@@ -160,7 +160,7 @@
                       unsigned int * const bestMatchP) {
     
     unsigned int paletteIndex;
-    unsigned int bestIndex;
+    unsigned int bestIndex = 0;
     unsigned int bestMatch;
 
     bestMatch = UINT_MAX;
@@ -1578,7 +1578,7 @@
       /* The color part of the color/alpha palette passed to the PNG
          compressor 
       */
-  unsigned int palette_size;
+  unsigned int palette_size = MAXCOLORS;
 
   gray trans_pnm[MAXCOLORS];
   png_byte  trans[MAXCOLORS];
openSUSE Build Service is sponsored by