-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
[3.13] gh-145376: Fix crashes in md5module.c (GH-145422) #145611
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Fix null pointer dereference in unusual error scenario in :mod:`hashlib`. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,7 +84,10 @@ | |
| static void | ||
| MD5_dealloc(MD5object *ptr) | ||
| { | ||
| Hacl_Hash_MD5_free(ptr->hash_state); | ||
| if (ptr->hash_state != NULL) { | ||
| Hacl_Hash_MD5_free(ptr->hash_state); | ||
| ptr->hash_state == NULL; | ||
|
Check warning on line 89 in Modules/md5module.c
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line should be:
eendebakpt marked this conversation as resolved.
Outdated
|
||
| } | ||
| PyTypeObject *tp = Py_TYPE((PyObject*)ptr); | ||
| PyObject_GC_UnTrack(ptr); | ||
| PyObject_GC_Del(ptr); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.