Bug 111027 - bad source code
Summary: bad source code
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pidentd
Version: 1
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Eido Inoue
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-26 15:33 UTC by d.binderman
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: 3.0.16-4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-04-14 15:57:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description d.binderman 2003-11-26 15:33:32 UTC
Description of problem:
I just tried to compile package pidentd-3_0_14-12 from Fedora.

The compiler said

1.

ikeygen.c(52): remark #592: variable "index" is used before its value
is set

The source code is

  unsigned char *index;

  if ( (dev_random = open("/dev/random", O_RDONLY)) == -1 ) {
    perror("unable to read /dev/random");
    exit(1);
  }
  while (index < keybuf + length) {


Suggest initialise index before first use.



Version-Release number of selected component (if applicable):
pidentd-3_0_14-12 

How reproducible:


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


Expected results:


Additional info:


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