diff options
author | Eclips4 <80244920+Eclips4@users.noreply.github.com> | 2023-02-16 17:46:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-16 17:46:43 (GMT) |
commit | 68bd8c5e2efab64ff9d38a214775164182179431 (patch) | |
tree | 09bd0d5138c62ef43b51a8e8ee16ca6ca1ef3c93 /Python/bytecodes.c | |
parent | 924a3bfa28578802eb9ca77a66fb5d4762a62f14 (diff) | |
download | cpython-68bd8c5e2efab64ff9d38a214775164182179431.zip cpython-68bd8c5e2efab64ff9d38a214775164182179431.tar.gz cpython-68bd8c5e2efab64ff9d38a214775164182179431.tar.bz2 |
gh-101952: Fix possible segfault in `BUILD_SET` opcode (#101958)
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r-- | Python/bytecodes.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c index d5d5034..84747f1 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -1302,6 +1302,8 @@ dummy_func( inst(BUILD_SET, (values[oparg] -- set)) { set = PySet_New(NULL); + if (set == NULL) + goto error; int err = 0; for (int i = 0; i < oparg; i++) { PyObject *item = values[i]; |