[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #30771] gnu grep segfault from incorrect option to -f
From: |
anonymous |
Subject: |
[bug #30771] gnu grep segfault from incorrect option to -f |
Date: |
Fri, 13 Aug 2010 21:40:22 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100731 IceCat/3.6.8 (like Firefox/3.6.8) |
URL:
<http://savannah.gnu.org/bugs/?30771>
Summary: gnu grep segfault from incorrect option to -f
Project: grep
Submitted by: None
Submitted on: Fri 13 Aug 2010 09:40:21 PM UTC
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
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
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?30771>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #30771] gnu grep segfault from incorrect option to -f,
anonymous <=