From: Nicolas Pitre Date: Tue, 27 Aug 2013 04:26:03 GMT Subject: [PATCH 19/23] pack v4: relax commit parsing a bit Message-ID: <1377577567-27655-20-git-send-email-nico@fluxnic.net> In-Reply-To: <1377577567-27655-1-git-send-email-nico@fluxnic.net> At least commit af25e94d4dcfb9608846242fabdd4e6014e5c9f0 in the Linux kernel repository has "author <> 1120285620 -0700" Signed-off-by: Nicolas Pitre --- packv4-create.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packv4-create.c b/packv4-create.c index 2d46d11..63dc3d2 100644 --- a/packv4-create.c +++ b/packv4-create.c @@ -157,12 +157,12 @@ static char *get_nameend_and_tz(char *from, int *tz_val) char *end, *tz; tz = strchr(from, '\n'); - /* let's assume the smallest possible string to be "x 0 +0000\n" */ - if (!tz || tz - from < 13) + /* let's assume the smallest possible string to be " <> 0 +0000\n" */ + if (!tz || tz - from < 11) return NULL; tz -= 4; end = tz - 4; - while (end - from > 5 && *end != ' ') + while (end - from > 3 && *end != ' ') end--; if (end[-1] != '>' || end[0] != ' ' || tz[-2] != ' ') return NULL; -- 1.8.4.22.g54757b7