From 4afa7625fa0819457809a2d54d99ef5ee5ed34e0 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 6 Jun 2020 03:38:03 +0000 Subject: Release 10.86.14 git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@3831 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/ppm/picttoppm.c | 3 ++- converter/ppm/pjtoppm.c | 9 +++++++++ doc/HISTORY | 14 ++++++++++++++ version.mk | 2 +- 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/converter/ppm/picttoppm.c b/converter/ppm/picttoppm.c index b8fb8642..06074684 100644 --- a/converter/ppm/picttoppm.c +++ b/converter/ppm/picttoppm.c @@ -1204,7 +1204,7 @@ doDiffSize(struct Rect const clipsrc, struct rgbPlanes const dst, unsigned int const dstwid) { - unsigned int const dstadd = dstwid - xsize; + unsigned int const dstadd = dstwid - rectwidth(&clipdst); FILE * pamscalePipeP; const char * command; @@ -1960,6 +1960,7 @@ ClipRgn(struct canvas * const canvasP, */ readRect(&clip_rect); + rectinter(clip_rect, picFrame, &clip_rect); /* XXX should clip this by picFrame */ if (verbose) dumpRect("clipping to", clip_rect); diff --git a/converter/ppm/pjtoppm.c b/converter/ppm/pjtoppm.c index b8b94f74..cd558855 100644 --- a/converter/ppm/pjtoppm.c +++ b/converter/ppm/pjtoppm.c @@ -10,6 +10,8 @@ ** implied warranty. */ +#include + #include "ppm.h" #include "pm_c_util.h" #include "mallocvar.h" @@ -54,6 +56,7 @@ main(int argc, const char ** argv) { int *imlen; FILE * ifP; int mode; + bool modeIsSet; int argn; unsigned char bf[3]; pixel * pixrow; @@ -74,6 +77,7 @@ main(int argc, const char ** argv) { row = 0; /* initial value */ plane = 0; /* initial value */ + modeIsSet = false; /* initial value */ while ((c = fgetc(ifP)) != -1) { if (c != '\033') @@ -145,6 +149,7 @@ main(int argc, const char ** argv) { if (val != 0 && val != 1) pm_error("unimplemented trasmission mode %d", val); mode = val; + modeIsSet = true; break; case 'V': /* send plane */ case 'W': /* send last plane */ @@ -214,6 +219,10 @@ main(int argc, const char ** argv) { } /* switch */ } pm_close(ifP); + + if (!modeIsSet) + pm_error("Input does not contain a 'bM' transmission mode order"); + rows = row; if (mode == 1) { int const newcols = 10240; /* It could not be larger that that! */ diff --git a/doc/HISTORY b/doc/HISTORY index cae01a30..0d80d150 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,20 @@ Netpbm. CHANGE HISTORY -------------- +20.06.06 BJH Release 10.86.14 + + pjtoppm: Handle input stream with no transmission mode command. + Always broken. Pjtoppm was in primordial Netpbm (1991). + + picttoppm: Fix bug with an input file that specifies a clip + region (ClipRgn opcode) that is not contained within the + picture frame. Result is invalid memory access. Broken + some time 1994-2002. + + picttoppm: Fix incorrect output (sheared) when a blit must be + scaled. Broken in Netpbm 10.34 (June 2006) or 10.35 (August + 2006). + 20.05.06 BJH Release 10.86.13 pbmtonokia: Fix incorrect output with -txt option. diff --git a/version.mk b/version.mk index 85d87780..e80def9c 100644 --- a/version.mk +++ b/version.mk @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 86 -NETPBM_POINT_RELEASE = 13 +NETPBM_POINT_RELEASE = 14 -- cgit 1.4.1