-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
Fix missing/incomplete NULL checks in multiple source files #104564
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* `Modules/_cursesmodule.c:_curses_initscr_impl`: pass `screen_encoding` to `PyCursesWindowObject` constructor instead of assigning it to field with possible NULL dereference * `Modules/_zoneinfo.c:update_strong_cache`: check `new_node` value for NULL * `Modules/errnomodule.c:errno_exec`: prevent leak of `error_dict` reference in case if `module_dict` is NULL * `Modules/posixmodule.c:os_setgroups`: check if `grouplist` is allocated, raise `MemoryError` otherwise * `Modules/sha1module.c:newSHA1object`: check `sha` value for NULL * `Modules/zlibmodule.c:ZlibDecompressor__new__`: check `self` value for NULL
sunmy2019
requested changes
May 17, 2023
sunmy2019
approved these changes
May 17, 2023
…into add-missing-null-checks
carljm
approved these changes
May 22, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One suggestion inline of a comment for clarity, but these changes look correct to me.
🤖 New build scheduled with the buildbot fleet by @sunmy2019 for commit c48e5e9 🤖 If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
…on if allocation fails
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Modules/_cursesmodule.c:_curses_initscr_impl: pass screen_encoding to PyCursesWindowObject constructor instead of assigning it to field with possible NULL dereferenceModules/_zoneinfo.c:update_strong_cache
: checknew_node
value for NULLModules/errnomodule.c:errno_exec
: prevent leak oferror_dict
reference in case ifmodule_dict
is NULLModules/posixmodule.c:os_setgroups
: check ifgrouplist
is allocated, raiseMemoryError
otherwiseModules/sha1module.c:newSHA1object
: checksha
value for NULLModules/zlibmodule.c:ZlibDecompressor__new__
: checkself
value for NULL