Bug 113374

Summary: uninitialised local data ?
Product: [Fedora] Fedora Reporter: d.binderman
Component: beecryptAssignee: Jeff Johnson <jbj>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-01-14 14:27:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description d.binderman 2004-01-13 11:16:36 UTC
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 14:27:06 UTC
psize is never 0, so temp is never not initialized.

I'll leave this for the upstream maintainer.