Bug 113665

Summary: broken data field read ?
Product: [Fedora] Fedora Reporter: d.binderman
Component: dhcpAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA 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-21 20:10:05 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-16 09:57:16 UTC
Description of problem:

I just tried to compile package dhcp-3.0pl2-6.16, from Redhat
Fedora Core 1.

The compiler said

packet.c(153): remark #592: variable "ip" is used before its value is set

The source code is

        IP_V_SET (&ip, 4);

but

#define IP_V_SET(iph,x) ((iph)->ip_fvhl = ((iph)->ip_fvhl & 0x0F) |
((x) << 4))

I think field ip_fvhl is being read from before it is initialised.
Suggest add

		memset( &ip, sizeof ip, 0);

just after the declaration of ip.



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


How reproducible:


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


Expected results:


Additional info:

Comment 1 Daniel Walsh 2004-01-21 20:10:05 UTC
Update latest code in Fedora core with this patch.

dhcp-3.0pl2-6.20


Comment 2 John Flanagan 2004-12-21 19:42:06 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-566.html