diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-06-28 17:29:32 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-06-28 17:29:32 +0000 |
commit | 23ce26f64c34e30951ad9ade2151552ed77e7357 (patch) | |
tree | d73b31a0c2f7c7be4a69f8a8e84e00dd39c432b5 /converter/other/pnmtopalm/palmtopnm.c | |
parent | 1b6e51a266008348ad93ed8b6ac9ec91b5024fea (diff) | |
download | netpbm-mirror-23ce26f64c34e30951ad9ade2151552ed77e7357.tar.gz netpbm-mirror-23ce26f64c34e30951ad9ade2151552ed77e7357.tar.xz netpbm-mirror-23ce26f64c34e30951ad9ade2151552ed77e7357.zip |
promote Advanced to Stable
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@4558 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other/pnmtopalm/palmtopnm.c')
-rw-r--r-- | converter/other/pnmtopalm/palmtopnm.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/converter/other/pnmtopalm/palmtopnm.c b/converter/other/pnmtopalm/palmtopnm.c index 0666141d..a64ab01c 100644 --- a/converter/other/pnmtopalm/palmtopnm.c +++ b/converter/other/pnmtopalm/palmtopnm.c @@ -798,10 +798,12 @@ readRleRow(FILE * const ifP, if (incount == 0) pm_error("Invalid (zero) count in RLE compression."); if (j + incount > bytesPerRow) - pm_error("Bytes in RLE compressed row exceed bytes per row. " - "Bytes per row is %u. A run length of %u bytes " - "pushes the bytes in this row up to %u bytes (and then " - "we gave up).", bytesPerRow, incount, j + incount); + pm_error("Invalid Palm image input. Header says %u bytes " + "per row after uncompressing from RLE, " + "but we encountered a row with a run length of %u bytes " + "that pushes the bytes in the row up to %u bytes " + "(and we didn't look at the rest of the row)", + bytesPerRow, incount, j + incount); pm_readcharu(ifP, &inval); memset(palmrow + j, inval, incount); j += incount; @@ -867,10 +869,11 @@ readPackBitsRow16(FILE * const ifP, j += nonrunlength; } if (j > bytesPerRow) - pm_error("Bytes in PackBits compressed row exceed bytes per row. " - "Bytes per row is %u. " - "The bytes in this row were pushed up to %u bytes " - "(and then we gave up).", bytesPerRow, j); + pm_error("Invalid Palm image input. Header says %u bytes " + "per row after uncompressing from 16-bit Packbits at, " + "but we counted %u bytes in a row, " + "before we stopped processing the row", + bytesPerRow, j); } } @@ -915,10 +918,11 @@ readPackBitsRow(FILE * const ifP, j += nonrunlength; } if (j > bytesPerRow) - pm_error("Bytes in PackBits compressed row exceed bytes per row. " - "Bytes per row is %u. " - "The bytes in this row were pushed up to %u bytes " - "(and then we gave up).", bytesPerRow, j); + pm_error("Invalid Palm image input. Header says %u bytes " + "per row after uncompressing from 8-bit Packbits, " + "but we counted %u bytes in a row, " + "before we stopped processing the row", + bytesPerRow, j); } } |