mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Fix accidentally reversed NULL test in load_mark(). Suggested by
Tamito Kajiyama. (This caused a bug only on platforms where malloc(0) returns NULL.)
This commit is contained in:
parent
fe23ad7283
commit
761fcd03aa
1 changed files with 1 additions and 1 deletions
|
@ -3295,7 +3295,7 @@ load_mark(Unpicklerobject *self) {
|
|||
if ((self->num_marks + 1) >= self->marks_size) {
|
||||
s=self->marks_size+20;
|
||||
if (s <= self->num_marks) s=self->num_marks + 1;
|
||||
if (self->marks)
|
||||
if (self->marks == NULL)
|
||||
self->marks=(int *)malloc(s * sizeof(int));
|
||||
else
|
||||
self->marks=(int *)realloc(self->marks, s * sizeof(int));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue