buggrep - Bugs: bug #21276, Memory and reference bugs in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #21276: Memory and reference bugs in lib/savedir.h

Submitted by:  Tony Abou-Assaleh <taa>
Submitted on:  Sun 07 Oct 2007 06:06:49 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Fri 12 Mar 2010 09:24:15 PM UTC, comment #1:

Thank you for the bug report. This bug has been fixed in the
development sources, which can be downloaded using git from
git://git.sv.gnu.org/grep.git

Paolo Bonzini <bonzini>
Sun 07 Oct 2007 06:06:49 AM UTC, original submission:

lib/savedir.h has multiple (2) memory leaks for two variables and
some more bugs:

  • path and pathlen are not static
  • pathlen is used uninitialized
  • path is repeatedly overwritten by the calloc() call
  • the 'slash = (path[dirlen] != '/')' line is totaly useless, because dirlenbpoints always to the '\0' of the previously strcpy(), so slash is always 1
  • if the relloc() of name_space failed, name_space is still a valid pointer

Thanks to Bert Wesarg for reporting this bug.

Tony Abou-Assaleh <taa>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bonzini (Posted a comment)
  • -unavailable- added by taa (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 12 Mar 2010 09:24:15 PM UTCbonziniStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1