p_start = p;
while ((c = sp[p]) >= '0' && c <= '9') {
+ /* arbitrary limit to 9 digits */
+ if (v >= 100000000)
+ return FALSE;
v = v * 10 + c - '0';
p++;
if (p - p_start == max_digits)
sgn = sp[p++];
if (sgn == '+' || sgn == '-') {
int n = p;
- if (!string_get_digits(sp, &p, &hh, 1, 9))
+ if (!string_get_digits(sp, &p, &hh, 1, 0))
return FALSE;
n = p - n;
if (strict && n != 2 && n != 4)
*is_local = FALSE;
} else {
p++;
- if (string_get_digits(sp, &p, &val, 1, 9)) {
+ if (string_get_digits(sp, &p, &val, 1, 0)) {
if (c == '-') {
if (val == 0)
return FALSE;
}
}
} else
- if (string_get_digits(sp, &p, &val, 1, 9)) {
+ if (string_get_digits(sp, &p, &val, 1, 0)) {
if (string_skip_char(sp, &p, ':')) {
/* time part */
fields[3] = val;