Check for signs in unsigned numbers and fail if we see one.
authorGuy Harris <guy@alum.mit.edu>
Tue, 6 Sep 2016 01:08:08 +0000 (18:08 -0700)
committerGuy Harris <guy@alum.mit.edu>
Tue, 6 Sep 2016 01:08:42 +0000 (01:08 +0000)
commit97103d40e36134436f96cc5efd06bbf2eccf734b
tree03af46a3d94b89a59bfccbe797365173784733de
parent4adf7f2be5b9132a0aef3e8f8f57ed525cff2e8e
Check for signs in unsigned numbers and fail if we see one.

-1 is not an unsigned number.  For that matter, neither is +1;
"unsigned" means "without a sign", and they both have signs.

ANSI C's strto{whatever} routines - even the ones that supposedly are
for "unsigned" values - and the GLib routines modeled after them allow a
leading sign, so we have to check ourselves.

Change-Id: Ia0584bbf83394185cde88eec48efcdfa316f1c92
Reviewed-on: https://code.wireshark.org/review/17511
Reviewed-by: Guy Harris <guy@alum.mit.edu>
wsutil/strtoi.c