diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2016-05-09 05:10:44 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2016-05-09 05:10:44 +0000 |
commit | 8b7a3351ed7e6c1784e59a65790b7e7ec1e9a5bc (patch) | |
tree | 1006893768e34cd79077fa74e576c346f963515c /editor | |
parent | 3bb2edc4c1563f23e5e2922095eb8d6705e499d1 (diff) | |
download | netpbm-mirror-8b7a3351ed7e6c1784e59a65790b7e7ec1e9a5bc.tar.gz netpbm-mirror-8b7a3351ed7e6c1784e59a65790b7e7ec1e9a5bc.tar.xz netpbm-mirror-8b7a3351ed7e6c1784e59a65790b7e7ec1e9a5bc.zip |
Release 10.74.03
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@2772 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor')
-rw-r--r-- | editor/Makefile | 2 | ||||
-rw-r--r-- | editor/pbmreduce.c | 3 | ||||
-rw-r--r-- | editor/pnmpaste.c | 6 |
3 files changed, 7 insertions, 4 deletions
diff --git a/editor/Makefile b/editor/Makefile index c163f220..39329f00 100644 --- a/editor/Makefile +++ b/editor/Makefile @@ -93,7 +93,7 @@ install.bin.local: $(PKGDIR)/bin # In March 2012, pnmquantall replaced ppmquantall cd $(PKGDIR)/bin ; \ rm -f ppmquantall$(EXE) ; \ - $(SYMLINK) pnmquantall ppmquantall + $(SYMLINK) pnmquantall$(EXE) ppmquantall$(EXE) # In August 2014, pamcomp replaced pnmcomp cd $(PKGDIR)/bin ; \ rm -f pnmcomp$(EXE) ; \ 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 <limits.h> #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 1e29d933..c27e288c 100644 --- a/editor/pnmpaste.c +++ b/editor/pnmpaste.c @@ -201,8 +201,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 shiftByteCt = pbm_packed_bytes(cols + offset); unsigned int const last = shiftByteCt - 1; @@ -268,7 +268,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); unsigned int const shiftByteCt = insertCol / 8; unsigned int const shiftOffset = insertCol % 8; unsigned int const baseColByteCt = pbm_packed_bytes(baseCols); |