aboutsummaryrefslogtreecommitdiff
path: root/date.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-07-12 13:46:49 -0700
committerJunio C Hamano <gitster@pobox.com>2012-07-12 13:49:41 -0700
commitbe21d167b2a819fd2b4991a395e95906b3cb176a (patch)
treed091446ca8a45ecc27a1967082c7d87776d078e1 /date.c
parentcb102b083252b575b18afa8d4b4a4b1bc1ffdf9e (diff)
downloadgit-be21d167b2a819fd2b4991a395e95906b3cb176a.tar.gz
git-be21d167b2a819fd2b4991a395e95906b3cb176a.tar.xz
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/date.c b/date.c
index bf8e088e6..67b3d66f6 100644
--- a/date.c
+++ b/date.c
@@ -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] != '-'))