-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
Closed as not planned
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Here's the problematic code:
cpython/Modules/_cursesmodule.c
Lines 3365 to 3367 in a2d0818
| winobj = (PyCursesWindowObject *)PyCursesWindow_New(win, NULL); | |
| screen_encoding = winobj->encoding; | |
| return (PyObject *)winobj; |
Why is it problematic? Because PyCursesWindow_New can return NULL here:
cpython/Modules/_cursesmodule.c
Lines 708 to 712 in a2d0818
| if (wo->encoding == NULL) { | |
| Py_DECREF(wo); | |
| PyErr_NoMemory(); | |
| return NULL; | |
| } |
So, winobj->encoding of NULL is not good :(
I will send a PR.
Linked PRs
Metadata
Metadata
Assignees
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error