From ae38293b8fe84689fb9decc2c1b6e54f32057941 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Mon, 9 May 2016 05:12:04 +0000 Subject: Release 10.47.61 git-svn-id: http://svn.code.sf.net/p/netpbm/code/super_stable@2774 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- analyzer/ppmhist.c | 2 +- converter/other/Makefile | 2 +- converter/other/bmptopnm.c | 8 +++++++- doc/HISTORY | 20 ++++++++++++++++++++ editor/pbmreduce.c | 3 +++ editor/pnmpaste.c | 6 +++--- version.mk | 2 +- 7 files changed, 36 insertions(+), 7 deletions(-) diff --git a/analyzer/ppmhist.c b/analyzer/ppmhist.c index 673c8175..f42adab5 100644 --- a/analyzer/ppmhist.c +++ b/analyzer/ppmhist.c @@ -151,7 +151,7 @@ colornameLabel(pixel const color, PPM_DEPTH(color255, color, maxval, 255); - colorIndex = ppm_findclosestcolor(dictColors, nDictColor, &color); + colorIndex = ppm_findclosestcolor(dictColors, nDictColor, &color255); assert(colorIndex >= 0 && colorIndex < nDictColor); diff --git a/converter/other/Makefile b/converter/other/Makefile index df084ceb..077db195 100644 --- a/converter/other/Makefile +++ b/converter/other/Makefile @@ -219,7 +219,7 @@ install.bin.local: $(PKGDIR)/bin # Remember that $(SYMLINK) might just be a copy command. # backward compatibility: program used to be named pnmnoraw cd $(PKGDIR)/bin ; \ - $(SYMLINK) pnmtoplainpnm pnmnoraw + $(SYMLINK) pnmtoplainpnm$(EXE) pnmnoraw$(EXE) # backward compatibility: program used to be gemtopbm cd $(PKGDIR)/bin ; \ $(SYMLINK) gemtopnm$(EXE) gemtopbm$(EXE) diff --git a/converter/other/bmptopnm.c b/converter/other/bmptopnm.c index 9a405d70..577944b0 100644 --- a/converter/other/bmptopnm.c +++ b/converter/other/bmptopnm.c @@ -607,9 +607,15 @@ BMPreadinfoheader(FILE * const ifP, readOs2InfoHeader(ifP, headerP); break; case 40: + readWindowsInfoHeader(ifP, cInfoHeaderSize, headerP); + break; case 108: + pm_error("%s: this is a Version 4 Windows BMP; " + "this program knows only Version 1"); + break; case 124: - readWindowsInfoHeader(ifP, cInfoHeaderSize, headerP); + pm_error("%s: this is a Version 5 Windows BMP; " + "this program knows only Version 1"); break; default: pm_error("%s: unknown Info Header size: %u bytes", diff --git a/doc/HISTORY b/doc/HISTORY index c70595c9..bdc60af6 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,26 @@ Netpbm. CHANGE HISTORY -------------- +16.05.09 BJH Release 10.47.61 + + bmptopnm: fail properly with Version 4, 5 Windows BMP. + + ppmhist: fix incorrect color names. Introduced in + Netpbm 10.19 (November 2003). + + pnmpaste: fix possible invalid memory access. Introduced in + Netpbm 1.44 (September 2008). + + pbmreduce: fix undefined behavior when scale factor argument is + too big. Always present (pbmreduce was new in September 1989). + + Install on Windows: fix backward compatibility symlinks for + pnmtoplainpnm, pnmquantall. + +16.03.27 BJH Release 10.47.60 + + (no changes - don't know why this release exists). + 15.12.25 BJH Release 10.47.59 anytopnm: use --mime-type option instead of --mime on newer diff --git a/editor/pbmreduce.c b/editor/pbmreduce.c index f49c8d9a..ee4a4fbd 100644 --- a/editor/pbmreduce.c +++ b/editor/pbmreduce.c @@ -10,6 +10,7 @@ ** implied warranty. */ +#include #include "pbm.h" #include "mallocvar.h" @@ -70,6 +71,8 @@ main( argc, argv ) pm_usage( usage ); if ( n < 2 ) pm_error( "N must be greater than 1" ); + if (n > INT_MAX / n) + pm_error("Scale argument too large. You specified %d", n); ++argn; if ( argn == argc ) diff --git a/editor/pnmpaste.c b/editor/pnmpaste.c index 33834669..123b0feb 100644 --- a/editor/pnmpaste.c +++ b/editor/pnmpaste.c @@ -191,8 +191,8 @@ insertShift(FILE * const ifP, Same as insertDirect(), but start merging 'offset' bits from the left end of 'destrow'. 'offset' is less than 8. - buffer[] is wide enough to hold a packed PBM row of *ifP plus one - byte of margin. + buffer[] is wide enough to hold a packed PBM row of *ifP plus two + bytes of margin. -----------------------------------------------------------------------------*/ unsigned int const shiftBytes = pbm_packed_bytes(cols + offset); unsigned int const last = shiftBytes - 1; @@ -258,7 +258,7 @@ pastePbm(FILE * const fpInset, Fast paste for PBM -----------------------------------------------------------------------------*/ unsigned char * const baserow = pbm_allocrow_packed(baseCols); - unsigned char * const buffer = pbm_allocrow_packed(insetCols+8); + unsigned char * const buffer = pbm_allocrow_packed(insetCols+16); int const shiftBytes = insertCol / 8; unsigned int const shiftOffset = insertCol % 8; int const baseColBytes = pbm_packed_bytes(baseCols); diff --git a/version.mk b/version.mk index 63346d7b..7b51e50e 100644 --- a/version.mk +++ b/version.mk @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 47 -NETPBM_POINT_RELEASE = 60 +NETPBM_POINT_RELEASE = 61 -- cgit 1.4.1