gh-105718: Fix buffer allocation in tokenizer with readline (#105728)

This commit is contained in:
Lysandros Nikolaou 2023-06-13 17:18:11 +02:00 committed by GitHub
parent d0f1afd942
commit abfbab6415
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 5 deletions

View file

@ -1106,11 +1106,7 @@ tok_readline_string(struct tok_state* tok) {
tok->inp += buflen;
*tok->inp = '\0';
if (tok->start == NULL) {
tok->buf = tok->cur;
}
tok->line_start = tok->cur;
Py_DECREF(line);
return 1;
error: