commit 693bff59e72660e841c2750fd421ebff5f3f71b2 from: Stefan Sperling via: Thomas Adam date: Thu Jan 19 16:33:26 2023 UTC add missing bounds-check in gitproto ref-line tokenizer commit - a8771ebd4482e832a941f8041ee67663418111f9 commit + 693bff59e72660e841c2750fd421ebff5f3f71b2 blob - 6f80f2dd7f9d638f38ae4b28c4b4b1e0f480b7fe blob + ca1719dd8649b956e27783774efab623fdba7ed8 --- lib/gitproto.c +++ lib/gitproto.c @@ -54,7 +54,7 @@ tokenize_line(char **tokens, char *line, int len, int tokens[i] = NULL; for (i = 0; n < len && i < maxtokens; i++) { - while (isspace((unsigned char)*line)) { + while (n < len && isspace((unsigned char)*line)) { line++; n++; }