projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
675d17c
)
bpo-36030: Fix a possible segfault in PyTuple_New() (GH-15670)
author
Zackery Spytz
<zspytz@gmail.com>
Wed, 4 Sep 2019 13:58:05 +0000
(07:58 -0600)
committer
Victor Stinner
<vstinner@redhat.com>
Wed, 4 Sep 2019 13:58:04 +0000
(15:58 +0200)
Objects/tupleobject.c
patch
|
blob
|
history
diff --git
a/Objects/tupleobject.c
b/Objects/tupleobject.c
index 3419baa529a6f031f0ceffbfaa60eda431a7382f..a72257f95b083be4e9f5d4246a32a3ef4a0e6028 100644
(file)
--- a/
Objects/tupleobject.c
+++ b/
Objects/tupleobject.c
@@
-146,6
+146,9
@@
PyTuple_New(Py_ssize_t size)
}
#endif
op = tuple_alloc(size);
+ if (op == NULL) {
+ return NULL;
+ }
for (Py_ssize_t i = 0; i < size; i++) {
op->ob_item[i] = NULL;
}