]> Dogcows Code - chaz/tar/commitdiff
(read_incr_db_01): Check input strings more
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 7 Aug 2006 21:29:27 +0000 (21:29 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 7 Aug 2006 21:29:27 +0000 (21:29 +0000)
carefully.  Do not pass arbitrary char values to isspace, as
this has undefined behavior.  Likewise for assigning arbitrary
uintmax_t values to other types.
(read_negative_num, read_unsigned_num, read_timespec):
New functions, to check input values a bit more carefuly.
(read_num): Use read_unsigned_num.  New arg MAX_VAL;
all callers changed.
(read_incr_db_2): Use these new functions.
Use a consistent diagnostic for unexpected EOF.
(read_directory_file): Do not assign arbitrary uintmax_t value
to int.
(read_timespec, write_directory_file_entry, write_directory_file):
Handle negative time_t values correctly.  We don't bother to do
this with pre-2 formats, since presumably the time stamps were
output incorrectly.


No differences found
This page took 0.022066 seconds and 4 git commands to generate.