diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-07-12 13:46:49 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-07-12 13:49:41 -0700 |
commit | be21d167b2a819fd2b4991a395e95906b3cb176a (patch) | |
tree | d091446ca8a45ecc27a1967082c7d87776d078e1 /date.c | |
parent | cb102b083252b575b18afa8d4b4a4b1bc1ffdf9e (diff) | |
download | git-be21d167b2a819fd2b4991a395e95906b3cb176a.tar.gz |
date.c: Fix off by one error in object-header date parsing
It is perfectly OK for a valid decimal integer to begin with '9' but
116eb3a (parse_date(): allow ancient git-timestamp, 2012-02-02) did
not express the range correctly.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'date.c')
-rw-r--r-- | date.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -595,7 +595,7 @@ static int match_object_header_date(const char *date, unsigned long *timestamp, unsigned long stamp; int ofs; - if (*date < '0' || '9' <= *date) + if (*date < '0' || '9' < *date) return -1; stamp = strtoul(date, &end, 10); if (*end != ' ' || stamp == ULONG_MAX || (end[1] != '+' && end[1] != '-')) |