bugfindutils - Bugs: bug #20834, find -execdir segfaults if PATH is...

 
 

bug #20834: find -execdir segfaults if PATH is not set.

Submitter:  Andreas Metzler <ametzler>
Submitted:  Sun 19 Aug 2007 07:58:16 AM UTC
   
 
Category:  find Severity:  3 - Normal
Item Group:  Wrong result Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Open/Closed:  Closed
Release:  4.2.31 Fixed Release:  4.3.9
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 19 Aug 2007 07:58:16 AM UTC, original submission:  

This is http://bugs.debian.org/438689 submitted by Reuben Thomas.

This causes a segfault:
env -u PATH find /tmp -exedir /bin/echo \;

The bug applies to both 4.2.x and 4.3.x and is caused by this code in parser.c:

-----------------------
static void
check_path_safety(const char action, char *argv)
{
  const char *path = getenv("PATH");
  char *s;

  (void)argv;
 
  s = next_element(path, 1);
-----------------------

Invoking next_element with NULL is only supposed to happen if it has been called before with non-NULL argument to initialize path.

cu andreas

Andreas Metzler <ametzler>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jay (Updated the item)
  • -email is unavailable- added by ametzler
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-11-11 jay Open/ClosedOpen Closed
        Fixed ReleaseNone 4.3.9
    2007-08-23 jay StatusIn Progress Fixed
    2007-08-19 jay Assigned toNone jay
        ReleaseNone 4.2.31
    2007-08-19 jay StatusNone In Progress
    2007-08-19 ametzler Carbon-CopyRemoved 20807 -
    2007-08-19 ametzler Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code