Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d0e8212

Browse filesBrowse files
authored
bpo-29347: Fix possibly dereferencing undefined pointers when creating weakref objects (#128)
1 parent e395c4d commit d0e8212
Copy full SHA for d0e8212

File tree

2 files changed

+5
-0
lines changed
Filter options

2 files changed

+5
-0
lines changed

‎Misc/NEWS

Copy file name to clipboardExpand all lines: Misc/NEWS
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ What's New in Python 3.7.0 alpha 1?
1010
Core and Builtins
1111
-----------------
1212

13+
- bpo-29347: Fixed possibly dereferencing undefined pointers
14+
when creating weakref objects.
15+
1316
- bpo-29438: Fixed use-after-free problem in key sharing dict.
1417

1518
- bpo-29546: Set the 'path' and 'name' attribute on ImportError for ``from ... import ...``.

‎Objects/weakrefobject.c

Copy file name to clipboardExpand all lines: Objects/weakrefobject.c
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ init_weakref(PyWeakReference *self, PyObject *ob, PyObject *callback)
2424
{
2525
self->hash = -1;
2626
self->wr_object = ob;
27+
self->wr_prev = NULL;
28+
self->wr_next = NULL;
2729
Py_XINCREF(callback);
2830
self->wr_callback = callback;
2931
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.