Bug 78707 - bad source code
Summary: bad source code
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: libungif
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact:
URL:
Whiteboard:
: 105839 114993 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-11-27 23:30 UTC by d.binderman
Modified: 2007-04-18 16:48 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-10-12 14:05:17 UTC
Embargoed:


Attachments (Terms of Use)

Description d.binderman 2002-11-27 23:30:44 UTC
Description of Problem:

Hello there,

I just tried to compile package libungif-4.1.0-13 from Redhat 8.0.

Here are some of the compiler messages.

gifinfo.c:163: warning: too few arguments for format
gifinfo.c:80: warning: `Width' might be used uninitialized in this function
gifinfo.c:80: warning: `Height' might be used uninitialized in this function
gif2rle.c:170: warning: too few arguments for format

Here is a patch which fixes the messages.

*** ./util/gif2rle.c.old	2002-11-13 11:01:38.000000000 +0000
--- ./util/gif2rle.c	2002-11-13 11:02:14.000000000 +0000
***************
*** 167,173 ****
  		    PROGRAM_NAME, ++ImageNum, Col, Row, Width, Height);
  		if (GifFile->Image.Left + GifFile->Image.Width > GifFile->SWidth ||
  		   GifFile->Image.Top + GifFile->Image.Height > GifFile->SHeight) {
! 		    fprintf(stderr, "Image %d is not confined to screen dimension, aborted.\n");
  		    exit(EXIT_FAILURE);
  		}
  		if (GifFile->Image.Interlace) {
--- 167,173 ----
  		    PROGRAM_NAME, ++ImageNum, Col, Row, Width, Height);
  		if (GifFile->Image.Left + GifFile->Image.Width > GifFile->SWidth ||
  		   GifFile->Image.Top + GifFile->Image.Height > GifFile->SHeight) {
! 		    fprintf(stderr, "Image %d is not confined to screen dimension, aborted.\n", ImageNum);
  		    exit(EXIT_FAILURE);
  		}
  		if (GifFile->Image.Interlace) {
*** ./util/gifinfo.c.old	2002-11-13 10:56:44.000000000 +0000
--- ./util/gifinfo.c	2002-11-13 11:01:19.000000000 +0000
***************
*** 77,83 ****
  ******************************************************************************/
  int main(int argc, char **argv)
  {
!     int	i, Error, NumFiles, NumFormats, Size, Width, Height, ExtCode;
      GifRecordType RecordType;
      GifByteType  *Extension;
      char         *Format = NULL, *Comment;
--- 77,83 ----
  ******************************************************************************/
  int main(int argc, char **argv)
  {
!     int	i, Error, NumFiles, NumFormats, Size, Width = 0, Height = 0, ExtCode;
      GifRecordType RecordType;
      GifByteType  *Extension;
      char         *Format = NULL, *Comment;
***************
*** 160,166 ****
  		Height = GifFile->Image.Height;
  		if (GifFile->Image.Left + GifFile->Image.Width > GifFile->SWidth ||
  		   GifFile->Image.Top + GifFile->Image.Height > GifFile->SHeight) {
! 		    fprintf(stderr, "Image %d is not confined to screen dimension, aborted.\n");
  		    exit(EXIT_FAILURE);
  		}
                  /* We don't care about Interlaced as image is not interesting, read sequentialy */
--- 160,166 ----
  		Height = GifFile->Image.Height;
  		if (GifFile->Image.Left + GifFile->Image.Width > GifFile->SWidth ||
  		   GifFile->Image.Top + GifFile->Image.Height > GifFile->SHeight) {
! 		    fprintf(stderr, "Image is not confined to screen dimension, aborted.\n");
  		    exit(EXIT_FAILURE);
  		}
                  /* We don't care about Interlaced as image is not interesting, read sequentialy */


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


How Reproducible:


Steps to Reproduce:
1. 
2. 
3. 

Actual Results:


Expected Results:


Additional Information:

Comment 1 Jonathan Blandford 2003-01-24 21:45:41 UTC
Hrm.  There are a lot of compiler warnings here.  This isn't a high priority, as
none of them look like real problems off hand, but I'll take a closer look later.

Comment 2 Jef Spaleta 2004-02-25 16:18:43 UTC
*** Bug 105839 has been marked as a duplicate of this bug. ***

Comment 3 Jef Spaleta 2004-02-25 16:27:35 UTC
*** Bug 114993 has been marked as a duplicate of this bug. ***

Comment 4 Robert Scheck 2004-10-09 23:07:34 UTC
I think, this bug report can be closed, because 4.1.2 and at least 
4.1.3 (bug #135189) solve this problem, so the suggested changes 
are already in upstream and I can't see any problems of this kind at 
a current rebuilding.


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