Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 302600 Details for
Bug 435078
The output of "strings -0 file" is in loop and "-n 0xA" cannot be correctly recognized
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Upstream form of the Comment 1 patch.
binutils-2.17.50.0.6-rh435078.patch (text/plain), 3.65 KB, created by
Jan Kratochvil
on 2008-04-16 13:36:37 UTC
(
hide
)
Description:
Upstream form of the Comment 1 patch.
Filename:
MIME Type:
Creator:
Jan Kratochvil
Created:
2008-04-16 13:36:37 UTC
Size:
3.65 KB
patch
obsolete
>2008-02-15 Chu Li <chul@cn.fujitsu.com> > Nick Clifton <nickc@redhat.com> > > PR binutils/5713 > * strings.c (integer_arg): Delete function. > (string_min): Initialise to 4. > (main): Use strtoul to parse integer arguments. > Move check for an invalid string length to after all the arguments > have been parsed. > (usage): Use indentation to indicate that -<n> is a another form > of the --bytes= command line option. > >2008-02-08 H.J. Lu <hongjiu.lu@intel.com> > > PR binutils/5713 > * strings.c (main): Set string_min to 4 if it is <= 0. > >Index: binutils/strings.c >=================================================================== >RCS file: /cvs/src/src/binutils/strings.c,v >retrieving revision 1.38 >retrieving revision 1.40 >diff -u -p -r1.38 -r1.40 >--- binutils/strings.c 25 Jan 2008 16:18:41 -0000 1.38 >+++ binutils/strings.c 15 Feb 2008 10:20:09 -0000 1.40 >@@ -160,7 +160,6 @@ typedef struct > static void strings_a_section (bfd *, asection *, void *); > static bfd_boolean strings_object_file (const char *); > static bfd_boolean strings_file (char *file); >-static int integer_arg (char *s); > static void print_strings (const char *, FILE *, file_off, int, int, char *); > static void usage (FILE *, int); > static long get_char (FILE *, file_off *, int *, char **); >@@ -185,7 +184,7 @@ main (int argc, char **argv) > > expandargv (&argc, &argv); > >- string_min = -1; >+ string_min = 4; > print_addresses = FALSE; > print_filenames = FALSE; > datasection_only = TRUE; >@@ -210,9 +209,7 @@ main (int argc, char **argv) > usage (stdout, 0); > > case 'n': >- string_min = integer_arg (optarg); >- if (string_min < 1) >- fatal (_("invalid number %s"), optarg); >+ string_min = (int) strtoul (optarg, NULL, 0); > break; > > case 'o': >@@ -262,16 +259,13 @@ main (int argc, char **argv) > usage (stderr, 1); > > default: >- if (string_min < 0) >- string_min = optc - '0'; >- else >- string_min = string_min * 10 + optc - '0'; >+ string_min = (int) strtoul (argv[optind - 1] + 1, NULL, 0); > break; > } > } > >- if (string_min < 0) >- string_min = 4; >+ if (string_min < 1) >+ fatal (_("invalid minimum string length %d"), string_min); > > switch (encoding) > { >@@ -666,51 +660,6 @@ print_strings (const char *filename, FIL > } > } > >-/* Parse string S as an integer, using decimal radix by default, >- but allowing octal and hex numbers as in C. */ >- >-static int >-integer_arg (char *s) >-{ >- int value; >- int radix = 10; >- char *p = s; >- int c; >- >- if (*p != '0') >- radix = 10; >- else if (*++p == 'x') >- { >- radix = 16; >- p++; >- } >- else >- radix = 8; >- >- value = 0; >- while (((c = *p++) >= '0' && c <= '9') >- || (radix == 16 && (c & ~40) >= 'A' && (c & ~40) <= 'Z')) >- { >- value *= radix; >- if (c >= '0' && c <= '9') >- value += c - '0'; >- else >- value += (c & ~40) - 'A'; >- } >- >- if (c == 'b') >- value *= 512; >- else if (c == 'B') >- value *= 1024; >- else >- p--; >- >- if (*p) >- fatal (_("invalid integer argument %s"), s); >- >- return value; >-} >- > static void > usage (FILE *stream, int status) > { >@@ -720,7 +669,7 @@ usage (FILE *stream, int status) > -a - --all Scan the entire file, not just the data section\n\ > -f --print-file-name Print the name of the file before each string\n\ > -n --bytes=[number] Locate & print any NUL-terminated sequence of at\n\ >- -<number> least [number] characters (default 4).\n\ >+ -<number> least [number] characters (default 4).\n\ > -t --radix={o,d,x} Print the location of the string in base 8, 10 or 16\n\ > -o An alias for --radix=o\n\ > -T --target=<BFDNAME> Specify the binary file format\n\
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 435078
:
296030
|
302600
|
302601