Tue, 13 Oct 2015 16:10:58 +0200
don't allow signs for date strings (always expect full years)
libidav/utils.c | file | annotate | diff | comparison | revisions |
--- a/libidav/utils.c Tue Oct 13 15:54:31 2015 +0200 +++ b/libidav/utils.c Tue Oct 13 16:10:58 2015 +0200 @@ -74,8 +74,8 @@ str++; } - // ensure we have numeric values (maybe with sign) - if(!isdigit(*str) && *str != '-' && *str != '+') { + // ensure we have numeric values + if(!isdigit(*str)) { return 1; } @@ -88,7 +88,7 @@ str++; tparts.tm_mon = strtoul(str, &str, 10) - 1; - if (*str++ != '-') { + if(*str++ != '-') { return 1; }