commit eca2b1d0d697cef723df2d1394b84b636c02ced0 from: Stefan Sperling date: Thu Jan 19 07:20:19 2023 UTC add missing bounds-check in gitproto ref-line tokenizer commit - 00d10bca0a12585f81942e747b330101d0f7303a commit + eca2b1d0d697cef723df2d1394b84b636c02ced0 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++; }