diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-01-07 17:46:49 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-01-07 17:46:49 (GMT) |
commit | 0d423b870b0669e7a47aca2739f89e96652546ce (patch) | |
tree | f79be272e08e3e2344e6ec7a48b040365935a816 /Modules | |
parent | bdd863d0621fdd4e16ff9f9fc1f7ed5fef432721 (diff) | |
download | cpython-0d423b870b0669e7a47aca2739f89e96652546ce.zip cpython-0d423b870b0669e7a47aca2739f89e96652546ce.tar.gz cpython-0d423b870b0669e7a47aca2739f89e96652546ce.tar.bz2 |
Issue #7455: Fix possible crash in cPickle on invalid input. Patch by
Florent Xicluna.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/cPickle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/cPickle.c b/Modules/cPickle.c index f97959b..7fa7f70 100644 --- a/Modules/cPickle.c +++ b/Modules/cPickle.c @@ -4117,7 +4117,7 @@ load_pop(Unpicklerobject *self) */ if (self->num_marks > 0 && self->marks[self->num_marks - 1] == len) { self->num_marks--; - } else if (len >= 0) { + } else if (len > 0) { len--; Py_DECREF(self->stack->data[len]); self->stack->length = len; |