diff options
-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); } |