Wireshark-commits: [Wireshark-commits] master 97103d4: Check for signs in unsigned numbers and fail

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 6 Sep 2016 01:09:02 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=97103d40e36134436f96cc5efd06bbf2eccf734b
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

97103d4 by Guy Harris (guy@xxxxxxxxxxxx):

    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@xxxxxxxxxxxx>
    

Actions performed:

    from  4adf7f2   Use get_positive_int() to parse signed positive arguments.
    adds  97103d4   Check for signs in unsigned numbers and fail if we see one.


Summary of changes:
 wsutil/strtoi.c |    7 +++++++
 1 file changed, 7 insertions(+)