SHA256
1
0
forked from pool/netpbm
netpbm/netpbm-10.35.74-pnmtopng-CAN-2978.patch

21 lines
560 B
Diff

--- 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];