mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
[3.12] gh-105718: Fix buffer allocation in tokenizer with readline (GH-105728) (#105729)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
This commit is contained in:
parent
04b9168037
commit
9c51ea5d55
3 changed files with 11 additions and 5 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue