mirror of https://github.com/python/cpython
[3.13] gh-123229: Fix valgrind warning by initializing the f-string buffers to 0 in the tokenizer (GH-123263) (#123264)
gh-123229: Fix valgrind warning by initializing the f-string buffers to 0 in the tokenizer (GH-123263)
(cherry picked from commit adc5190014
)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
This commit is contained in:
parent
0955db1bd8
commit
935b8b422b
|
@ -0,0 +1,2 @@
|
|||
Fix valgrind warning by initializing the f-string buffers to 0 in the
|
||||
tokenizer. Patch by Pablo Galindo
|
|
@ -12,7 +12,8 @@
|
|||
struct tok_state *
|
||||
_PyTokenizer_tok_new(void)
|
||||
{
|
||||
struct tok_state *tok = (struct tok_state *)PyMem_Malloc(
|
||||
struct tok_state *tok = (struct tok_state *)PyMem_Calloc(
|
||||
1,
|
||||
sizeof(struct tok_state));
|
||||
if (tok == NULL)
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue