Archive

Archive for March, 2009

pbmclean is dead in Fedora releases of Netpbm

March 31st, 2009 flo No comments

I’ve just been bitten by a bug in pbmclean, one of the tools in the Netpbm package of graphics tools, as provided by Fedora. For a long time, I’ve been building Netpbm from sources, but I’ve been trying to cut down the amount of rework I have to do when updating Fedora, so I’ve moved back to RPMs, but my scanning and cleanup toolchain just broke when pbmclean refused to work at all. A quick test confirmed that it fails for the simplest possible image as well:

$ pbmmake 1 1 | pbmclean > /dev/null
pbmclean: EOF / read error reading a one-byte sample

A bug for this in Red Hat Bugzilla but, if anyone else is experiencing this right now, a simple workaround is pull down the source RPM and rebuild the package without netpbm-10.23-security.patch.

This patch seems to incorporate a load of tests for overflowing arithmetic in image sizes but the “fixes” kill pbmclean and pbmlife, because their tests for row numbers have been incorrectly changed, from:

if (row + 1 < rows)

(in pbmclean.c), to

if (row <= rows)

which clearly isn't the same thing at all. The original tests, although odd-looking, are correct because both pbmclean and pbmlife incorporate row read-ahead, because they change pixels based on the properties of their neighbours.

This bug is present in netpbm-progs-10.35.58-1.fc9.i386.

Categories: Uncategorized Tags: ,