Bug 113374 - uninitialised local data ?
Summary: uninitialised local data ?
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: beecrypt (Show other bugs)
(Show other bugs)
Version: 1
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-01-13 11:16 UTC by d.binderman
Modified: 2007-11-30 22:10 UTC (History)
0 users

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: ---


Attachments (Terms of Use)

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.


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