Re: [PATCH 00/14] numparse module: systematically tighten up integer parsing
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Mar 17, 2015, 23:05 UTC
- Message-ID
- <CACsJy8AiHHKBD4vV5aJec9CGzBqfSCNU6-j=LjDhsp2VrC55+A@mail.gmail.com>
- In-Reply-To
- <1426608016-2978-1-git-send-email-mhagger@alum.mit.edu>
On Tue, Mar 17, 2015 at 11:00 PM, Michael Haggerty <mhagger@alum.mit.edu> wrote:
Show 15 quoted lines
> Michael Haggerty (14): > numparse: new module for parsing integral numbers > cacheinfo_callback(): use convert_ui() when handling "--cacheinfo" > write_subdirectory(): use convert_ui() for parsing mode > handle_revision_opt(): use skip_prefix() in many places > handle_revision_opt(): use convert_i() when handling "-<digit>" > strtoul_ui(), strtol_i(): remove functions > handle_revision_opt(): use convert_ui() when handling "--abbrev=" > builtin_diff(): detect errors when parsing --unified argument > opt_arg(): val is always non-NULL > opt_arg(): use convert_i() in implementation > opt_arg(): report errors parsing option values > opt_arg(): simplify pointer handling > diff_opt_parse(): use convert_i() when handling "-l<num>" > diff_opt_parse(): use convert_i() when handling --abbrev=<num>
Thank you for doing it. I was about to write another number parser and you did it :D Maybe you can add another patch to convert the only strtol in upload-pack.c to parse_ui. This place should accept positive number in base 10, plus sign is not accepted.
-- Duy