diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2017-09-28 01:24:37 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2017-09-28 01:24:37 +0000 |
commit | fd89b0bdc07ab7da700fcfeffd4093549e2ff5c2 (patch) | |
tree | 916cf669061d89f0ce7331a45d099cc30e7f86a8 /converter | |
parent | 1472db408ce70f13c4423a58dfe47f023ef0dd5f (diff) | |
download | netpbm-mirror-fd89b0bdc07ab7da700fcfeffd4093549e2ff5c2.tar.gz netpbm-mirror-fd89b0bdc07ab7da700fcfeffd4093549e2ff5c2.tar.xz netpbm-mirror-fd89b0bdc07ab7da700fcfeffd4093549e2ff5c2.zip |
Release 10.47.66
git-svn-id: http://svn.code.sf.net/p/netpbm/code/super_stable@3077 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter')
-rw-r--r-- | converter/other/pnmtopalm/palmtopnm.c | 11 | ||||
-rw-r--r-- | converter/pbm/pbmtoibm23xx.c | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/converter/other/pnmtopalm/palmtopnm.c b/converter/other/pnmtopalm/palmtopnm.c index 88088817..e686571b 100644 --- a/converter/other/pnmtopalm/palmtopnm.c +++ b/converter/other/pnmtopalm/palmtopnm.c @@ -688,6 +688,11 @@ doTransparent(FILE * const ofP, colormap->ncolors, sizeof(color), palmcolor_compare_indices)); + if (!actualColor) + pm_error("Invalid input; transparent index %u " + "is not among the %u colors in the image's colormap", + transparentIndex, colormap->ncolors); + fprintf(ofP, "#%02x%02x%02x\n", (unsigned int) ((*actualColor >> 16) & 0xFF), (unsigned int) ((*actualColor >> 8) & 0xFF), @@ -1020,6 +1025,12 @@ convertRowToPnmNotDirect(const unsigned char * const palmrow, colormap->ncolors, sizeof(color2), palmcolor_compare_indices)); + if (!actualColor) + pm_error("Invalid input. A color index in column %u " + "is %u, which is not among the %u colors " + "in the colormap", + j, color, colormap->ncolors); + PPM_ASSIGN(xelrow[j], (*actualColor >> 16) & 0xFF, (*actualColor >> 8) & 0xFF, diff --git a/converter/pbm/pbmtoibm23xx.c b/converter/pbm/pbmtoibm23xx.c index a83e260d..334b649d 100644 --- a/converter/pbm/pbmtoibm23xx.c +++ b/converter/pbm/pbmtoibm23xx.c @@ -4,7 +4,7 @@ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version - * 2 as published by the Free Software Foundation. + * 2 or later as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of |