buggrep - Bugs: bug #30771, gnu grep segfault from incorrect...

 
 

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

bug #30771: gnu grep segfault from incorrect option to -f

Submitted by:  None
Submitted on:  Fri 13 Aug 2010 09:40:21 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Mon 30 Aug 2010 07:52:15 AM UTC, comment #2:

The segfault is now fixed. Thanks for the report!

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>
Fri 13 Aug 2010 10:02:46 PM UTC, comment #1:

SORRY: the second example given:

echo hi | grep -Fi -f /tmp/

should be

echo hi | grep -F -f /tmp/

instead. Just not having the 'i' flag results in the inconsistent behavior.

Thanks,
Bake Timmons

Bake Timmons <bt3>
Fri 13 Aug 2010 09:40:21 PM UTC, original submission:

The following example gives a segfault in GNU grep (v2.6.3):

echo hi | grep -Fi -f /tmp/

Of course, that is an incorrect grep invocation, but the behavior is inconsistent with this example:

echo hi | grep -Fi -f /tmp/

Here grep fails with exit code 1 as if there were no matches.

I recommend just adding a simple check that the filename argument of the -f option does in fact refer to a regular file.

Thanks,
Bake Timmons

Anonymous

 

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 bt3 (Posted a comment)
  •  

    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
    Mon 30 Aug 2010 07:52:15 AM UTCbonziniStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1