Bug 188597 - ppmtogif no longer works in netpbm 10.33
ppmtogif no longer works in netpbm 10.33
Product: Fedora
Classification: Fedora
Component: netpbm (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jindrich Novy
Ben Levenson
: 188592 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2006-04-11 12:33 EDT by Gilles Detillieux
Modified: 2013-07-02 19:15 EDT (History)
3 users (show)

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

Attachments (Terms of Use)
fix for ppmtogif bug in netpbm 10.33 (611 bytes, patch)
2006-04-11 14:20 EDT, Gilles Detillieux
no flags Details | Diff

  None (edit)
Description Gilles Detillieux 2006-04-11 12:33:09 EDT
Description of problem:
Conversion of PPM to GIF no longer works after installing recent netpbm-progs
update (to version 10.33-0).

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. pnmquant 256 < /usr/share/tk8.4/demos/images/teapot.ppm | ppmtogif > t.gif
2. eog t.gif
3. giftopnm t.gif
Actual results:
eog reports...
loading failed: t.gif
loading failed: GIF image loader cannot understand this image..

giftopnm reports...
giftopnm: Error in GIF image: contains LZW string loop
giftopnm: Error in GIF input stream

Expected results:
Display of a lovely teapot image from eog.

Additional info:
Replacing /usr/bin/ppmtogif with an older version restores proper behaviour. 
Current version also sometimes produces GIF images that cause eog to fail with a
stack overflow.  Corrupt GIFs from ppmtogif also don't display in Firefox, and
they're much smaller than the valid GIFs produced by previous versions.  Running
the new version of ppmtogif with the -nolzw option produces a GIF that eog can
display, so the problem would seem to be in the LZW compression.
Comment 1 Gilles Detillieux 2006-04-11 14:20:20 EDT
Created attachment 127630 [details]
fix for ppmtogif bug in netpbm 10.33

This patch fixes the problem.  Whoever was rewriting the output() function in
ppmtogif.c didn't understand the concept of initialization of static variables.
 The curAccum and curBits variables need to be initialized once only, not on
every call of the output() function.
Comment 2 Jindrich Novy 2006-04-13 03:59:59 EDT
Yes, this is likely. Upstream did a lot of breakages in the recent time (the
last one was ppmtompeg segfault). Of course the variables need to be initialized
first. Thanks for the patch. Confirmed it fixes the problem.
Comment 3 Jindrich Novy 2006-04-13 04:15:56 EDT
*** Bug 188592 has been marked as a duplicate of this bug. ***
Comment 4 Jindrich Novy 2006-04-13 10:44:35 EDT
It's now fixed in rawhide.
Comment 5 Fedora Update System 2006-04-17 11:41:24 EDT
netpbm-10.33-1.FC4 has been pushed for fc4, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.
Comment 6 Fedora Update System 2006-04-17 11:41:54 EDT
netpbm-10.33-1.fc5 has been pushed for fc5, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

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