{"thread":{"id":"31011","subject":"[PATCH] date.c: Fix off by one error in object-header date parsing","startedAt":"2012-07-12T20:50:46Z","lastAt":"2012-07-12T20:50:46Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"194984","messageId":"7vsjcwael5.fsf@alter.siamese.dyndns.org","threadId":"31011","inReplyTo":null,"subject":"[PATCH] date.c: Fix off by one error in object-header date parsing","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-07-12T20:50:46Z","receivedAt":"2012-07-12T20:50:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"It is perfectly OK for a valid decimal integer to begin with '9' but\n116eb3a (parse_date(): allow ancient git-timestamp, 2012-02-02) did\nnot express the range correctly.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n date.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/date.c b/date.c\nindex bf8e088..67b3d66 100644\n--- a/date.c\n+++ b/date.c\n@@ -595,7 +595,7 @@ static int match_object_header_date(const char *date, unsigned long *timestamp,\n \tunsigned long stamp;\n \tint ofs;\n \n-\tif (*date < '0' || '9' <= *date)\n+\tif (*date < '0' || '9' < *date)\n \t\treturn -1;\n \tstamp = strtoul(date, &end, 10);\n \tif (*end != ' ' || stamp == ULONG_MAX || (end[1] != '+' && end[1] != '-'))\n-- \n1.7.11.2\n"}]}