diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2014-12-18 23:47:30 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2014-12-18 23:47:30 +0000 |
commit | 731bf1e2804a640fc0e62091ff654bd0748c52b6 (patch) | |
tree | d9e960c323356e408528d45f0d12e02248b9b719 | |
parent | 8e8f8b28ca71fcaf270b88658ab34ea2ec10f452 (diff) | |
download | netpbm-mirror-731bf1e2804a640fc0e62091ff654bd0748c52b6.tar.gz netpbm-mirror-731bf1e2804a640fc0e62091ff654bd0748c52b6.tar.xz netpbm-mirror-731bf1e2804a640fc0e62091ff654bd0748c52b6.zip |
Fix bogus 'bad magic number' message
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2343 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | doc/HISTORY | 5 | ||||
-rw-r--r-- | lib/libppm1.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/doc/HISTORY b/doc/HISTORY index 9797e992..1e0627a4 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -26,6 +26,11 @@ not yet BJH Release 10.69.00 anytopnm: convert all images in a multi-image GIF instead of just the first. + Fix bogus message from ppmXXX programs when the input is not + (per the magic number) a Netpbm image. Introduced after + Netpbm 10.26 (January 2005) but before Netpbm 10.35 (August + 2006). + ppmtoarbtxt: Fix some undefined behavior when program limits are exceeded (i.e. buffer overruns). diff --git a/lib/libppm1.c b/lib/libppm1.c index ff940540..2e17e894 100644 --- a/lib/libppm1.c +++ b/lib/libppm1.c @@ -148,8 +148,8 @@ ppm_readppminit(FILE * const fileP, break; default: - pm_error("bad magic number %d - not a PPM, PGM, PBM, or PAM file", - PAM_FORMAT_TYPE(*formatP)); + pm_error("bad magic number 0x%x - not a PPM, PGM, PBM, or PAM file", + realFormat); } validateComputableSize(*colsP, *rowsP); } |