diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-05-21 03:22:14 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-05-21 03:22:14 +0000 |
commit | ec79e9e3a856fc08726b2cb43adcadc24726343a (patch) | |
tree | a10c41ee828588b9b3b9d959e8eaa2d831d75613 /converter | |
parent | 1defb0708829eb4c6908e5a3af987b0e8ea9dd53 (diff) | |
download | netpbm-mirror-ec79e9e3a856fc08726b2cb43adcadc24726343a.tar.gz netpbm-mirror-ec79e9e3a856fc08726b2cb43adcadc24726343a.tar.xz netpbm-mirror-ec79e9e3a856fc08726b2cb43adcadc24726343a.zip |
Clarify error message
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3611 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter')
-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); } } |