Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 35924 - pnmtopng crashes
pnmtopng crashes
Product: Red Hat Linux
Classification: Retired
Component: netpbm (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Knirsch
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2001-04-14 09:04 EDT by Han-Wen Nienhuys
Modified: 2015-03-04 20:09 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-04-18 07:46:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Han-Wen Nienhuys 2001-04-14 09:04:32 EDT
pnmtopng crashes on zero-sized pictures:

blauw:~/usr/src/lilypond$ cat pngcrash.pnm
0 0
blauw:~/usr/src/lilypond$ pnmtopng < pngcrash.pnm  > /dev/null
pnmtopng:  fatal libpng error: No IDATs written into file
pnmtopng: setjmp returns error condition (2)
Comment 1 Phil Knirsch 2001-04-18 07:46:55 EDT
Looking into it...

Read ya, Phil
Comment 2 Phil Knirsch 2001-04-23 09:58:30 EDT
OK, after checking some documents and the libpng itself it seems as if PNG
doesn't support 0x0 sized images.

So the correct answer is that the input is already bogous. What could be done is
to ignore the conversion of such an image and display an error message (which
i'll do for the next release), but there is no sane way to convert such a valid
PNM picture into a PNG image.

To test it i hacked a modified version of pnmtopng where i output a empty IDAT
block into the file if there image is 0x0 pixels, and no program can read that
picture afterwards and complains about an invalid PNG image size.

Hope this clarifies the situation.

Read ya, Phil

Note You need to log in before you can comment on or make changes to this bug.