Bug 110825 - bad source code
bad source code
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: inn (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Martin Stransky
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-24 12:11 EST by d.binderman
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-16 08:13:52 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2003-11-24 12:11:06 EST
Description of problem:

I just tried to compile package inn-2_3_5-6 from Fedora.

The compiler said

1.

cnfs.c(1334): remark #592: variable "middle" is used before its value 
is set
cnfs.c(1335): remark #592: variable "limit" is used before its value 
is set

The source code is

        strcpy(buf2, CNFSofft2hex(middle, FALSE));
        strcpy(buf3, CNFSofft2hex(limit, FALSE));

But both middle & limit have no initialiser since their declaration.

2.

misc.c(379): remark #592: variable "hash" is used before its value is 
set
misc.c(382): remark #592: variable "token" is used before its value 
is set

The source code is

        sprintf(buff, "[%s]%c%lu%c%lu%c%lu%c%s\n", HashToText(hash),
                HIS_FIELDSEP, dummy, HIS_SUBFIELDSEP,
                dummy, HIS_SUBFIELDSEP,
                dummy, HIS_FIELDSEP, TokenToText(token));

Here again, has & token have not been initialised before use.

3.

perl.c(292): remark #1011: missing return statement at end of non-
void function
"perlAuthInit"

Self explanatory. Missing return statement.

4.

post.c(1212): remark #592: variable "result" is used before its value 
is set

The source code is

        if (result != EOF) {

More missing initialisers.


Version-Release number of selected component (if applicable):
inn-2_3_5-6 

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Martin Stransky 2004-11-08 10:47:01 EST
What kind of compiler do you use?
Comment 2 David Binderman 2004-11-20 05:06:58 EST
>What kind of compiler do you use?

Intel 8.1 - it's much better than gcc for finding bugs - see above.

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