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 3485715

Browse filesBrowse files
committed
bpo-29347: Fix possibly dereferencing undefined pointers when creating weakref objects (python#128)
1 parent a4afdfc commit 3485715
Copy full SHA for 3485715

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.6.1 release candidate 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
- Issue #29319: Prevent RunMainFromImporter overwriting sys.path[0].

‎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.