From 470372222f011c15be1b03f179ed0a26a5875830 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Thu, 26 Sep 2013 03:30:07 +0000 Subject: Release 10.35.90 git-svn-id: http://svn.code.sf.net/p/netpbm/code/super_stable@2001 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- Makefile.version | 2 +- converter/ppm/ppmtoxpm.c | 4 +++- doc/HISTORY | 14 ++++++++++++++ generator/ppmforge.c | 5 ++++- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/Makefile.version b/Makefile.version index 17010890..2d87f56c 100644 --- a/Makefile.version +++ b/Makefile.version @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 35 -NETPBM_POINT_RELEASE = 89 +NETPBM_POINT_RELEASE = 90 diff --git a/converter/ppm/ppmtoxpm.c b/converter/ppm/ppmtoxpm.c index 853ae711..630653df 100644 --- a/converter/ppm/ppmtoxpm.c +++ b/converter/ppm/ppmtoxpm.c @@ -634,8 +634,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 29e5f928..9dbcc470 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,20 @@ Netpbm. CHANGE HISTORY -------------- +13.09.26 BJH Release 10.35.90 + + 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 . + + ppmforge: fix array bounds violation. Always broken (program + was added in Pbmplus (October 1991). Thanks Prophet of the Way + . + 13.05.03 BJH Release 10.35.89 ppmtowinicon: fix bug: sometimes creates image truncated in the diff --git a/generator/ppmforge.c b/generator/ppmforge.c index fcbbc1f1..cac56e38 100644 --- a/generator/ppmforge.c +++ b/generator/ppmforge.c @@ -493,7 +493,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]; } @@ -1053,6 +1053,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) ; -- cgit 1.4.1