]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-94332: make it safe to call assemble_free when assemble_init has not been called...
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>
Thu, 30 Jun 2022 15:40:37 +0000 (16:40 +0100)
committerGitHub <noreply@github.com>
Thu, 30 Jun 2022 15:40:37 +0000 (16:40 +0100)
(cherry picked from commit be82d26570343dafc8a89be5a1a0e2f58d51a904)

Python/compile.c

index 90fae6328f4164d27bf47267929ec9e7bfb22d31..ea2fdfdb60405f0d0837e5e2a7d0861620768370 100644 (file)
@@ -7116,6 +7116,7 @@ assemble(struct compiler *c, int addNone)
     int j, nblocks;
     PyCodeObject *co = NULL;
     PyObject *consts = NULL;
+    memset(&a, 0, sizeof(struct assembler));
 
     /* Make sure every block that falls off the end returns None.
        XXX NEXT_BLOCK() isn't quite right, because if the last