diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 2016-09-21 15:47:40 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 2016-09-21 15:47:40 +0000 |
| commit | 5fca7e1f131a64b6d1af8d38ccbfce0b0fa93eb1 (patch) | |
| tree | d54293d9285e508f1955d094451710e20990b23a /lib | |
| parent | 05761ebcf159cd0cde701f9139211da535710345 (diff) | |
Notes
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libc/stdtime/strptime.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libc/stdtime/strptime.c b/lib/libc/stdtime/strptime.c index 9f9840820aa61..89703ec8be3c6 100644 --- a/lib/libc/stdtime/strptime.c +++ b/lib/libc/stdtime/strptime.c @@ -582,10 +582,16 @@ label: i *= 10; i += *buf - '0'; buf++; + } else if (len == 2) { + i *= 100; + break; } else return (NULL); } + if (i > 1400 || (sign == -1 && i > 1200) || + (i % 100) >= 60) + return (NULL); tm->tm_hour -= sign * (i / 100); tm->tm_min -= sign * (i % 100); *GMTp = 1; |
