--- converter/other/pnmtopng.c +++ converter/other/pnmtopng.c @@ -521,7 +521,7 @@ unsigned int * const bestMatchP) { unsigned int paletteIndex; - unsigned int bestIndex; + unsigned int bestIndex = 0; unsigned int bestMatch; assert(paletteSize > 0); @@ -2342,7 +2342,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];