SHA256
1
0
forked from pool/netpbm
netpbm/netpbm-pnmtopng-CAN-2978.patch
Petr Gajdos 20145d3c7b - updated to 10.35.80:
* asciitopgm: fix bug: memory corruption on too-long lines.
  * asciitopgm: fix bug: improper handling of blank lines.
  * pngtopnm: fix bug: -verbose reports history chunk present when
              it's really a palette.
  * bmptopnm: Don't crash on invalid zero value of image height in
              the BMP header of a compressed file.
  * bmptopnm: don't crash on large invalid value of 'colorsused' in
              the BMP header.
  * ilbmtoppm: Don't crash on image that has a transparent color
              index, but no color map.

OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=29
2011-05-24 14:06:56 +00:00

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