bugfindutils - Bugs: bug #20662, memory leak from gnulib dirname...

 
 

bug #20662: memory leak from gnulib dirname module

Submitted by:  Eric Blake <ericb>
Submitted on:  Thu 02 Aug 2007 12:57:20 PM UTC  
 
Category: findSeverity: 3 - Normal
Item Group: Wrong resultStatus: Fixed
Privacy: PublicAssigned to: Eric Blake <ericb>
Originator Name: Eric BlakeOpen/Closed: Closed
Release: 4.2.28Fixed Release: 4.3.9

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 02 Aug 2007 12:57:20 PM UTC, original submission:

In July 2006, gnulib changed the dirname module so that base_name started returning a malloc'd result, for similarity with dir_name, and added last_component as the replacement that did not malloc.

That means the following constructs in CVS head now leak memory (and similar constructs are on the 4.2.x branch), since 4.2.28 and 4.3.1:

./find/find.c: char *base = base_name(pathname);
./find/pred.c: checked_print_quoted (dest, segment->text, base_name (pathname));
./find/pred.c: base = base_name (pathname);
./find/pred.c: base = base_name (pathname);
./locate/locate.c: procdata->munged_filename = base_name(procdata->original_filename);

They should either free the memory, or use s/base_name/last_component/.

Eric Blake <ericb>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

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 jay (Updated the item)
  • -unavailable- added by ericb (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 11 Nov 2007 07:46:41 PM UTCjayOpen/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.3.9
    Sun 05 Aug 2007 12:48:05 PM UTCericbStatusIn Progress=>Fixed

    Back to the top


    Powered by Savane 3.1-cleanup1