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

 
 

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

Submitted by:  Andreas Metzler <ametzler>
Submitted on:  Sun 19 Aug 2007 07:58:16 AM UTC  
 
Category: findSeverity: 3 - Normal
Item Group: Wrong resultStatus: Fixed
Privacy: PublicAssigned to: James Youngman <jay>
Originator Name: Open/Closed: Closed
Release: 4.2.31Fixed 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.

 

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 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 ametzler
  •  

    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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 11 Nov 2007 07:48:10 PM UTCjayOpen/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.3.9
    Thu 23 Aug 2007 09:03:47 AM UTCjayStatusIn Progress=>Fixed
    Sun 19 Aug 2007 03:31:15 PM UTCjayAssigned toNone=>jay
      ReleaseNone=>4.2.31
    Sun 19 Aug 2007 03:31:14 PM UTCjayStatusNone=>In Progress
    Sun 19 Aug 2007 07:58:33 AM UTCametzlerCarbon-CopyRemoved 20807=>-
    Sun 19 Aug 2007 07:58:16 AM UTCametzlerCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1