From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Thu, 30 Jun 2022 15:40:37 +0000 (+0100) Subject: gh-94332: make it safe to call assemble_free when assemble_init has not been called... X-Git-Tag: v3.10.6~101 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1e6c678bf15cb8146485c9777e2e1205dace4ae6;p=thirdparty%2FPython%2Fcpython.git gh-94332: make it safe to call assemble_free when assemble_init has not been called (GH-94389) (GH-94443) (cherry picked from commit be82d26570343dafc8a89be5a1a0e2f58d51a904) --- diff --git a/Python/compile.c b/Python/compile.c index 90fae6328f41..ea2fdfdb6040 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -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