Bug 113374 - uninitialised local data ?
uninitialised local data ?
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: beecrypt (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-13 06:16 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-01-14 09:27:06 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 2004-01-13 06:16:36 EST
Description of problem:

I just tried to compile package beecrypt-3.0.1-0.20030630.1, from
Redhat Fedora Core 1.

The compiler said

1.

mpbarrett.c:500: warning: `temp' might be used uninitialized in this
function

The source code is

        mpw temp;

        while (psize)
        {
                if ((temp = *(pdata++))) /* break when first non-zero
word found */
                        break;
                psize--;
        }

        /* if temp is still zero, then we're trying to raise x to
power zero, and result stays one */
        if (temp)

It's pretty obvious that temp need to be initialised before the while
loop.

Suggest

		temp = 0;

as new code before the while loop.

2.

mpbarrett.c:530: warning: `temp' might be used uninitialized in this
function

This seems to be a duplicate.


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


How reproducible:


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


Expected results:


Additional info:
Comment 1 Jeff Johnson 2004-01-14 09:27:06 EST
psize is never 0, so temp is never not initialized.

I'll leave this for the upstream maintainer.

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