diff options
-rw-r--r-- | converter/other/giftopnm.c | 1 | ||||
-rw-r--r-- | converter/ppm/ppmtoxpm.c | 4 | ||||
-rw-r--r-- | doc/HISTORY | 24 | ||||
-rw-r--r-- | generator/ppmforge.c | 5 | ||||
-rw-r--r-- | lib/libppmcolor.c | 5 | ||||
-rw-r--r-- | version.mk | 2 |
6 files changed, 38 insertions, 3 deletions
diff --git a/converter/other/giftopnm.c b/converter/other/giftopnm.c index abfdb0ba..7d517aad 100644 --- a/converter/other/giftopnm.c +++ b/converter/other/giftopnm.c @@ -1218,6 +1218,7 @@ lzwReadByte(struct decompressor * const decompP, *endOfImageP = TRUE; *errorP = NULL; } else { + *endOfImageP = FALSE; expandCodeOntoStack(decompP, code, errorP); if (!*errorP) *dataReadP = popStack(&decompP->stack); diff --git a/converter/ppm/ppmtoxpm.c b/converter/ppm/ppmtoxpm.c index ff47359b..38d99972 100644 --- a/converter/ppm/ppmtoxpm.c +++ b/converter/ppm/ppmtoxpm.c @@ -636,8 +636,10 @@ main(int argc, char *argv[]) { if (cmdline.hexonly) colornameHash = NULL; + else if (cmdline.rgb) + ppm_readcolornamefile(cmdline.rgb, TRUE, &colornameHash, &colornames); else - ppm_readcolornamefile(cmdline.rgb, FALSE, &colornameHash, &colornames); + ppm_readcolornamefile(NULL, FALSE, &colornameHash, &colornames); /* Now generate the character-pixel colormap table. */ genCmap(chv, ncolors, maxval, diff --git a/doc/HISTORY b/doc/HISTORY index ed9ddd95..215a44c4 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,30 @@ Netpbm. CHANGE HISTORY -------------- +13.06.14 BJH Release 10.62.08 + + giftopnm: fix bug: erroneously claims GIF ends prematurely. + Broken in Netpbm 10.38 (March 2007). This affects all GIfs, but + the problem does not manifest when Netpbm was built with Gcc + from 2007 and later. + + libnetpbm: fix bug: ppm_freecolornames() has wild pointer + dereference when the color name table was generated empty + because the color dictionary file was not openable. ppmtoxpm + suffers from this. Broken in 10.15 (April 2003). + + ppmtoxpm: fix bug: ignores inability to open the specified color + dictionary file (-rgb) and just doesn't use color names. + Introduced in Netpbm 10.15 (April 2003). + + ppmforge. fix crash when -mesh is 1 or less. Always broken + (program was added in Pbmplus (October 1991). Thanks Prophet of + the Way <afu@wta.att.ne.jp>. + + ppmforge: fix array bounds violation. Always broken (program + was added in Pbmplus (October 1991). Thanks Prophet of the Way + <afu@wta.att.ne.jp>. + 13.05.27 BJH Release 10.62.07 pnmtops: Fix bug: only first image gets converted. Broken in diff --git a/generator/ppmforge.c b/generator/ppmforge.c index 047d3d6e..189e930c 100644 --- a/generator/ppmforge.c +++ b/generator/ppmforge.c @@ -487,7 +487,7 @@ createPlanetStuff(float * const a, double const bx = (n - 1) * uprj(j, cols); bxf[j] = floor(bx); - bxc[j] = bxf[j] + 1; + bxc[j] = MIN(bxf[j] + 1, n - 1); u[j] = bx - bxf[j]; u1[j] = 1 - u[j]; } @@ -1047,6 +1047,9 @@ main(int argc, char ** argv) { if ((i == argc) || (sscanf(argv[i], "%d", &meshsize) != 1)) pm_usage(usage); + if (meshsize < 2) + pm_error("mesh must be at least 2"); + /* Force FFT mesh to the next larger power of 2. */ for (j = meshsize; (j & 1) == 0; j >>= 1) ; diff --git a/lib/libppmcolor.c b/lib/libppmcolor.c index 3e7bf27c..70e8499d 100644 --- a/lib/libppmcolor.c +++ b/lib/libppmcolor.c @@ -598,6 +598,11 @@ readColorFile(const char * const fileName, empty file */ *nColorsP = 0; + { + unsigned int i; + for (i = 0; i < MAXCOLORNAMES; ++i) + colornames[i] = NULL; + } *errorP = NULL; } else { readOpenColorFile(colorFileP, nColorsP, colornames, colors, cht, diff --git a/version.mk b/version.mk index e0f17fec..74e571b9 100644 --- a/version.mk +++ b/version.mk @@ -1,4 +1,4 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 62 -NETPBM_POINT_RELEASE = 7 +NETPBM_POINT_RELEASE = 8 |