diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2015-08-15 02:00:12 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2015-08-15 02:00:12 +0000 |
commit | 63fe73995bd1d496f1465a4446c0adc833d204dc (patch) | |
tree | 6e5062a48e5fb39dcbd8165c515a9a0e375ec851 | |
parent | fed74115faf1c899c1621768a5db09527c667fae (diff) | |
download | netpbm-mirror-63fe73995bd1d496f1465a4446c0adc833d204dc.tar.gz netpbm-mirror-63fe73995bd1d496f1465a4446c0adc833d204dc.tar.xz netpbm-mirror-63fe73995bd1d496f1465a4446c0adc833d204dc.zip |
Release 10.47.58
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@2629 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | converter/other/fitstopnm.c | 7 | ||||
-rw-r--r-- | converter/other/pnmtopclxl.c | 9 | ||||
-rw-r--r-- | converter/pbm/pbmtomacp.c | 1 | ||||
-rw-r--r-- | converter/pgm/sbigtopgm.c | 4 | ||||
-rw-r--r-- | converter/ppm/ppmtoilbm.c | 2 | ||||
-rw-r--r-- | converter/ppm/ppmtoyuvsplit.c | 12 | ||||
-rw-r--r-- | doc/HISTORY | 29 | ||||
-rw-r--r-- | version.mk | 2 |
8 files changed, 52 insertions, 14 deletions
diff --git a/converter/other/fitstopnm.c b/converter/other/fitstopnm.c index 0d8753e5..73564c4b 100644 --- a/converter/other/fitstopnm.c +++ b/converter/other/fitstopnm.c @@ -51,9 +51,9 @@ struct cmdlineInfo { const char * inputFileName; unsigned int image; /* zero if unspecified */ - double max; + float max; unsigned int maxSpec; - double min; + float min; unsigned int minSpec; unsigned int scanmax; unsigned int printmax; @@ -581,7 +581,8 @@ convertPgmRaster(FILE * const ifP, */ unsigned int image; - pm_message("writing PGM file"); + pm_message("Writing PPM file " + "(Probably not what you want - consider an -image option)"); for (image = 1; image <= desiredImage; ++image) { unsigned int row; diff --git a/converter/other/pnmtopclxl.c b/converter/other/pnmtopclxl.c index 34f7065d..e16afb14 100644 --- a/converter/other/pnmtopclxl.c +++ b/converter/other/pnmtopclxl.c @@ -251,9 +251,14 @@ out(XY_rle *rle,int count) { rle->fbpos+=count; } if(rle->fbpos+129>rle->fbufsize) { + if (rle->fbufsize > INT_MAX/1.2) + pm_error("Arithmetic overflow during attempt to expand RLE " + "output buffer beyond %u", rle->fbufsize); rle->fbufsize*=1.2; rle->fbuf=realloc(rle->fbuf,rle->fbufsize); if(rle->fbuf==NULL) { + pm_error("Out of memory while attempting to expand RLE " + "output buffer beyond %u", rle->fbufsize); rle->error=-1; rle->fbpos=0; return -1; @@ -324,7 +329,7 @@ XY_Write(int fd, const void *buf,int cnt) { while(len<cnt) { int n = write(fd,(char*)buf+len,cnt-len); if(n<=0) - return n; + pm_error("Failed to write %u bytes to fd %d", cnt - len, fd); len+=n; } return len; @@ -817,6 +822,8 @@ convertAndWriteImage(int const outFd, xl_attr_ubyte(outFd, aDestinationSize); XL_Operator(outFd, oBeginImage); + if (pclGenP->linelen > INT_MAX / 20) + pm_error("Image too big"); rle = XY_RLEnew(pclGenP->linelen*20); if (!rle) pm_error("Unable to allocate %d bytes for the RLE buffer", diff --git a/converter/pbm/pbmtomacp.c b/converter/pbm/pbmtomacp.c index 9dc700e6..600cc407 100644 --- a/converter/pbm/pbmtomacp.c +++ b/converter/pbm/pbmtomacp.c @@ -12,6 +12,7 @@ #include <string.h> +#include "pm_c_util.h" #include "pbm.h" #include "macp.h" diff --git a/converter/pgm/sbigtopgm.c b/converter/pgm/sbigtopgm.c index ef8b8202..dd4e921a 100644 --- a/converter/pgm/sbigtopgm.c +++ b/converter/pgm/sbigtopgm.c @@ -123,8 +123,8 @@ int main(argc, argv) pm_error("malformed SBIG file header at character %d", hdr - header); } *cp = 0; - if (strncmp(hdr, "ST-", 3) == 0) || - (hdr == &hdr[0] && strstr(hdr,"Image") != NULL)) { + if (strncmp(hdr, "ST-", 3) == 0 || + (hdr == &header[0] && strstr(hdr,"Image") != NULL)) { char *ep = strchr(hdr + 3, ' '); if (ep != NULL) { diff --git a/converter/ppm/ppmtoilbm.c b/converter/ppm/ppmtoilbm.c index 5de167dc..d296f498 100644 --- a/converter/ppm/ppmtoilbm.c +++ b/converter/ppm/ppmtoilbm.c @@ -635,7 +635,7 @@ ppm_to_ham(fp, cols, rows, maxval, colormap, colors, cmapmaxval, hamplanes) if( DO_COMPRESS ) write_body_rows(); else - do_ham_body(fp, NULL, cols, rows, maxval, hammaxval, + do_ham_body(fp, stdout, cols, rows, maxval, hammaxval, nPlanes, colormap, colors); } diff --git a/converter/ppm/ppmtoyuvsplit.c b/converter/ppm/ppmtoyuvsplit.c index eb89ad29..b5809d0b 100644 --- a/converter/ppm/ppmtoyuvsplit.c +++ b/converter/ppm/ppmtoyuvsplit.c @@ -46,9 +46,9 @@ static void makeOutputFileName(const char * const baseName, struct FileNameSet * const fnameP) { - pm_asprintf(&fnameP->u, "%s.U", baseName); - pm_asprintf(&fnameP->v, "%s.V", baseName); - pm_asprintf(&fnameP->y, "%s.Y", baseName); + asprintfN(&fnameP->u, "%s.U", baseName); + asprintfN(&fnameP->v, "%s.V", baseName); + asprintfN(&fnameP->y, "%s.Y", baseName); } @@ -56,9 +56,9 @@ makeOutputFileName(const char * const baseName, static void termFileNameSet(struct FileNameSet const fname) { - pm_strfree(fname.u); - pm_strfree(fname.v); - pm_strfree(fname.y); + strfree(fname.u); + strfree(fname.v); + strfree(fname.y); } diff --git a/doc/HISTORY b/doc/HISTORY index 27df344d..add28ec2 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,35 @@ Netpbm. CHANGE HISTORY -------------- +15.08.15 BJH Release 10.47.58 + + fitstopnm: Add message saying you're probably making a mistake + if you have a 3-D image and don't specify -image. The third + dimension is almost always time in practice. + + fitstopnm: Fix -min and -max. Broken in Netpbm 10.39 (June + 2007). + + Pnmtopclxl: fix wild memory access when out of memory. Always + broken (Pnmtopclxl was new in Netpbm 10.6 (July 2002)). + + Pnmtopclxl: fix wild memory access with pathologically large and + uncompressible image. Always broken (Pnmtopclxl was new in + Netpbm 10.6 (July 2002)). + + Pnmtopclxl: fix silent output corruption when a file write + fails. Always broken (Pnmtopclxl was new in Netpbm 10.6 (July + 2002)). + + ppmtoilbm: Fix failure with -hamforce and -nocompression. + Broken in Netpbm 9.12 (March 2001). + + Build: fix compile error in sbigtopnm introduced in 10.47.57 + (June 2015). + + Build: fix link errors in pbmtomacp, ppmtoyuvsplit introduced + in 10.47.57 (June 2015). + 15.06.28 BJH Release 10.47.57 palmtopnm: Fix distorted output with PackBits compressed input. diff --git a/version.mk b/version.mk index fbf4ea4d..6d99a98f 100644 --- a/version.mk +++ b/version.mk @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 47 -NETPBM_POINT_RELEASE = 57 +NETPBM_POINT_RELEASE = 58 |