21 lines
731 B
Diff
21 lines
731 B
Diff
--- netpbm-10.20/converter/other/pnmtopng.c.orig 2005-10-19 13:41:17.000000000 +0200
|
|
+++ netpbm-10.20/converter/other/pnmtopng.c 2005-10-19 13:42:13.000000000 +0200
|
|
@@ -152,7 +152,7 @@ closestColorInPalette(pixel con
|
|
unsigned int * const bestMatchP) {
|
|
|
|
unsigned int paletteIndex;
|
|
- unsigned int bestIndex;
|
|
+ unsigned int bestIndex = 0;
|
|
unsigned int bestMatch;
|
|
|
|
bestMatch = UINT_MAX;
|
|
@@ -1359,7 +1359,7 @@ convertpnm(FILE * const ifp,
|
|
/* 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];
|