- bmptopnm won't crash with "BMPlencolormap: internal error!" (#224554)

This commit is contained in:
Jindrich Novy 2007-01-29 12:50:54 +00:00
parent e58c9886e3
commit 61375697ea
2 changed files with 14 additions and 12 deletions

View File

@ -1,6 +1,6 @@
--- netpbm-10.32/converter/other/bmptopnm.c.bmptopnm 2006-02-27 15:02:02.000000000 +0100 --- netpbm-10.35/converter/other/bmptopnm.c.bmptopnm 2007-01-29 13:08:46.000000000 +0100
+++ netpbm-10.32/converter/other/bmptopnm.c 2006-02-27 15:07:31.000000000 +0100 +++ netpbm-10.35/converter/other/bmptopnm.c 2007-01-29 13:32:21.000000000 +0100
@@ -1248,7 +1248,7 @@ readBmp(FILE * const ifP, @@ -1262,7 +1262,7 @@ readBmp(FILE * const ifP,
xel ** const colormapP, xel ** const colormapP,
bool const verbose) { bool const verbose) {
@ -9,12 +9,11 @@
unsigned int pos; unsigned int pos;
/* Current byte position in the BMP file */ /* Current byte position in the BMP file */
@@ -1455,7 +1455,7 @@ main(int argc, char ** argv) { @@ -1278,7 +1278,6 @@ readBmp(FILE * const ifP,
writeRasterGen(BMPraster, cols, rows, outputType, cBitCount, BMPreadfileheader(ifP, &bytesRead, &offBits);
pixelformat, colormap); pos += bytesRead;
} }
- free(colormap); - if(BMPheader.cmapsize != 0)
+ if (colormap) free(colormap); {
free(BMPraster); unsigned int bytesRead;
BMPreadinfoheader(ifP, &bytesRead, &BMPheader);
return 0;

View File

@ -1,7 +1,7 @@
Summary: A library for handling different graphics file formats. Summary: A library for handling different graphics file formats.
Name: netpbm Name: netpbm
Version: 10.35 Version: 10.35
Release: 9%{?dist} Release: 10%{?dist}
License: freeware License: freeware
Group: System Environment/Libraries Group: System Environment/Libraries
URL: http://netpbm.sourceforge.net/ URL: http://netpbm.sourceforge.net/
@ -189,6 +189,9 @@ rm -rf $RPM_BUILD_ROOT/usr/config_template
%{_mandir}/man5/* %{_mandir}/man5/*
%changelog %changelog
* Mon Jan 29 2006 Jindrich Novy <jnovy@redhat.com> 10.35-10
- bmptopnm won't crash with "BMPlencolormap: internal error!" (#224554)
* Thu Dec 28 2006 Jindrich Novy <jnovy@redhat.com> 10.35-9 * Thu Dec 28 2006 Jindrich Novy <jnovy@redhat.com> 10.35-9
- pbmtog3 won't segfault on 64bit arches (#220739) - pbmtog3 won't segfault on 64bit arches (#220739)