diff options
Diffstat (limited to 'lib/util/shhopt.c')
-rw-r--r-- | lib/util/shhopt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/util/shhopt.c b/lib/util/shhopt.c index 7722b5d5..15058bb5 100644 --- a/lib/util/shhopt.c +++ b/lib/util/shhopt.c @@ -427,6 +427,11 @@ optExecute(optEntry const opt, char *arg, int lng) if (arg == NULL) optFatal("internal error: optExecute() called with NULL argument " "'%s'", optString(opt, lng)); + + if (arg[0] == '-' || arg[1] == '+') + optFatal("unsigned number '%s' has a sign ('%c')", + arg, arg[0]); + tmp = strtoul(arg, &e, 10); if (*e) optFatal("invalid number `%s'", arg); |