netpbm/netpbm-10.27-bmptopnm.patch

20 lines
771 B
Diff

--- netpbm-10.35/converter/other/bmptopnm.c.bmptopnm 2007-01-29 13:08:46.000000000 +0100
+++ netpbm-10.35/converter/other/bmptopnm.c 2007-01-29 13:32:21.000000000 +0100
@@ -1262,7 +1262,7 @@ readBmp(FILE * const ifP,
xel ** const colormapP,
bool const verbose) {
- xel * colormap; /* malloc'ed */
+ xel * colormap = NULL; /* malloc'ed */
unsigned int pos;
/* Current byte position in the BMP file */
@@ -1278,7 +1278,6 @@ readBmp(FILE * const ifP,
BMPreadfileheader(ifP, &bytesRead, &offBits);
pos += bytesRead;
}
- if(BMPheader.cmapsize != 0)
{
unsigned int bytesRead;
BMPreadinfoheader(ifP, &bytesRead, &BMPheader);