Bug 117332 - calling free on random pointer value
calling free on random pointer value
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: prelink (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-03-02 16:33 EST by d.binderman
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 0.3.1-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-03-04 12:37:48 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-03-02 16:33:12 EST
Description of problem:

I just tried to compile Core2 Test1 package prelink-0.3.0-20

The compiler said

prelink.c(348): remark #592: variable "data" is used before its value
is set

The source code is

         free (data.d_buf);

Calling free on uninit local variable data is deeply unwise.  Suggest init
data.d_buf before first use.



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


How reproducible:


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


Expected results:


Additional info:
Comment 1 Jakub Jelinek 2004-03-02 17:20:30 EST
Thanks, fixed in my tree.  Bigger bug is that GCC doesn't warn about
this (only when the variable is not aggregate).  ++todo.
Comment 2 Jay Turner 2004-09-02 01:19:47 EDT
An errata 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-386.html

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