+2008-11-26 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * strings.c (main): New variable `s'. Have string_min parsing
+ call fatal for invalid input strings.
+
2008-11-25 Nick Clifton <nickc@redhat.com>
PR7044
int optc;
int exit_status = 0;
bfd_boolean files_given = FALSE;
+ char *s;
#if defined (HAVE_SETLOCALE)
setlocale (LC_ALL, "");
usage (stdout, 0);
case 'n':
- string_min = (int) strtoul (optarg, NULL, 0);
+ string_min = (int) strtoul (optarg, &s, 0);
+ if (s != NULL && *s != 0)
+ fatal (_("invalid integer argument %s"), optarg);
break;
case 'o':
usage (stderr, 1);
default:
- string_min = (int) strtoul (argv[optind - 1] + 1, NULL, 0);
+ string_min = (int) strtoul (argv[optind - 1] + 1, &s, 0);
+ if (s != NULL && *s != 0)
+ fatal (_("invalid integer argument %s"), argv[optind - 1] + 1);
break;
}
}