mirror of
https://https.git.savannah.gnu.org/git/tar.git
synced 2026-01-27 01:44:34 +00:00
* scripts/xsparse.c: Include inttypes.h, for strtoimax. Don’t include stdint.h, since inttypes.h includes it. Sort include directives. Make all extern functions and vars static, except for ‘main’. (string_to_off): Use strtoimax instead of doing overflow checking by hand, incorrectly (it relied on undefined behavior). (string_to_size): New arg MAXSIZE. All callers changed. (get_var): Return bool not int. Fix unlikely integer overflow. Use strncmp instead of memcmp, to avoid unlikely pointer overflow. (read_xheader, read_map, main): Avoid unlikely integer overflow. Check for I/O errors more consistently. (main): Prefer bool to int, and put vars near use.