summaryrefslogtreecommitdiffstats
path: root/Python/generated_cases.c.h
diff options
context:
space:
mode:
authorEclips4 <80244920+Eclips4@users.noreply.github.com>2023-02-16 17:46:43 (GMT)
committerGitHub <noreply@github.com>2023-02-16 17:46:43 (GMT)
commit68bd8c5e2efab64ff9d38a214775164182179431 (patch)
tree09bd0d5138c62ef43b51a8e8ee16ca6ca1ef3c93 /Python/generated_cases.c.h
parent924a3bfa28578802eb9ca77a66fb5d4762a62f14 (diff)
downloadcpython-68bd8c5e2efab64ff9d38a214775164182179431.zip
cpython-68bd8c5e2efab64ff9d38a214775164182179431.tar.gz
cpython-68bd8c5e2efab64ff9d38a214775164182179431.tar.bz2
gh-101952: Fix possible segfault in `BUILD_SET` opcode (#101958)
Diffstat (limited to 'Python/generated_cases.c.h')
-rw-r--r--Python/generated_cases.c.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h
index 8b8a716..730dfb7 100644
--- a/Python/generated_cases.c.h
+++ b/Python/generated_cases.c.h
@@ -1649,6 +1649,8 @@
PyObject **values = &PEEK(oparg);
PyObject *set;
set = PySet_New(NULL);
+ if (set == NULL)
+ goto error;
int err = 0;
for (int i = 0; i < oparg; i++) {
PyObject *item = values[i];