diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-06-28 23:54:29 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-06-28 23:54:29 +0000 |
commit | be0a23cddaf0182d1fda4f623a3b23f67db91d73 (patch) | |
tree | 5d46db6bd85005728f7821965e66e3e5f0018d62 /converter/other/pnmtopalm/palmtopnm.c | |
parent | b13ba8b9b606c916e0bda39348ee009e920df22e (diff) | |
download | netpbm-mirror-be0a23cddaf0182d1fda4f623a3b23f67db91d73.tar.gz netpbm-mirror-be0a23cddaf0182d1fda4f623a3b23f67db91d73.tar.xz netpbm-mirror-be0a23cddaf0182d1fda4f623a3b23f67db91d73.zip |
Promote Development to Advanced
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@3647 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 b3c0321a..445f7839 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; @@ -848,10 +850,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); } } @@ -886,10 +889,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); } } |