bugfindutils - Bugs: bug #52220, 'find -D' segfaults

 
 

bug #52220: 'find -D' segfaults

Submitted by:  None
Submitted on:  Thu 12 Oct 2017 08:30:12 PM UTC  
 
Category:  find Severity:  3 - Normal
Item Group:  Wrong result Status:  Fixed
Privacy:  Public Assigned to:  Bernhard Voelker <berny>
Originator Name:  Felix Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  4.6.0
Fixed Release:  4.6.0

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 22 Oct 2017 06:53:57 PM UTC, comment #5:

Thanks for the review - pushed (with the duplicate "the" in the
commit message removed) at:
https://git.sv.gnu.org/cgit/findutils.git/commit/?id=ef1581ea51

Bernhard Voelker <berny>
Project AdministratorIn charge of this item.
Sat 21 Oct 2017 05:09:23 PM UTC, comment #4:

Works for me, thanks!

Tavian Barnes <tavianator>
Wed 18 Oct 2017 10:16:19 PM UTC, comment #3:

Thanks, this seems to be a problem with certain strtok_r
implementations. Mine here seems to handle NULL in the
first call.

Patch attached - please check.

(file #42192)

Bernhard Voelker <berny>
Project AdministratorIn charge of this item.
Sun 15 Oct 2017 09:31:49 PM UTC, comment #2:

Reproduces here:

The code does

but argv[i+1] is NULL. The first thing process_debug_options() does is

NULL arg is invalid as the first call to strtok_r.

Tavian Barnes <tavianator>
Thu 12 Oct 2017 11:26:09 PM UTC, comment #1:

I can't reproduce here:

$ find/find -D
find/find: Empty argument to the -D option.

$ find/find --version
find (GNU findutils) 4.6.0
...

and with the latest source from Git:

$ find/find -D
find/find: Empty argument to the -D option.
Try 'find/find --help' for more information.

Would you please provide more information, like information about
your environment, a stack trace, maybe strace output, etc.?

Thanks & have a nice day,
Berny

Bernhard Voelker <berny>
Project AdministratorIn charge of this item.
Thu 12 Oct 2017 08:30:12 PM UTC, original submission:

Hello,

1. the version of findutils you are using
version 4.6.0

3. the exact command line that you used
find -D

4. what you expected to happen
I expected to get "find: '-D' must take an argument" or the help version of -D.

5. precisely what did happen.
segfault

Thank you for your time.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #42192:  0001-find-avoid-segfault-with-D-without-argument.patch added by berny (4KiB - text/x-patch - [PATCH] find: avoid segfault with -D without argument)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by tavianator (Posted a comment)
  • -email is unavailable- added by berny (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-10-22 berny StatusReady For Test => Fixed
    2017-10-18 berny Attached File- => Added 0001-find-avoid-segfault-with-D-without-argument.patch, #42192
        StatusNeed Info => Ready For Test
    2017-10-12 berny StatusNone => Need Info
        Assigned toNone => berny

    Back to the top


    Powered by Savane 3.3