When I use the command "strings" like this: "strings -0 file" will trap in
infinite loop.
The binutils version is 2.17.50.0.6. Has this bug been fixed?
If not, here is my patch.
Thank you.
Chu Li
Signed-off-by: Chu Li <[EMAIL PROTECTED]>
----------------------------------------------
diff --git a/strings.c b/strings.c
index 4c68ea8..8ee2783 100644
--- a/strings.c
+++ b/strings.c
@@ -274,6 +274,9 @@ main (int argc, char **argv)
}
}
+ if(string_min == 0)
+ fatal (_("invalid number %d"), string_min);
+
if (string_min < 0)
string_min = 4;
--
Summary: strings: use '-0' as option will meet infinite loop
Product: binutils
Version: 2.17
Status: NEW
Severity: normal
Priority: P2
Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: chul at cn dot fujitsu dot com
CC: bug-binutils at gnu dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=5713
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
_______________________________________________
bug-binutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-binutils