8000 bpo-34395: Don't free allocated memory on realloc fail in load_mark() in _pickle.c. by sir-sigurd · Pull Request #8788 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-34395: Don't free allocated memory on realloc fail in load_mark() in _pickle.c. #8788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 25, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'master' into bpo-34395
  • Loading branch information
sir-sigurd committed Aug 25, 2018
commit 2c99af78f91e32c12407e2fe1de82903877c0a57
2 changes: 1 addition & 1 deletion Modules/_pickle.c
Original file line number Diff line number Diff line change
Expand Up @@ -6288,7 +6288,7 @@ load_mark(UnpicklerObject *self)
* mark stack.
*/

if ((self->num_marks + 1) >= self->marks_size) {
if (self->num_marks >= self->marks_size) {
size_t alloc = ((size_t)self->num_marks << 1) + 20;
Py_ssize_t *marks_new = self->marks;
PyMem_RESIZE(marks_new, Py_ssize_t, alloc);
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.
0