bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/5713] New: strings: use '-0' as option will meet infinite


From: chul at cn dot fujitsu dot com
Subject: [Bug binutils/5713] New: strings: use '-0' as option will meet infinite loop
Date: 2 Feb 2008 02:42:06 -0000

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 <address@hidden>
----------------------------------------------
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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]