Bug report
Here's the problematic code:
| winobj= (PyCursesWindowObject*)PyCursesWindow_New(win, NULL); |
| screen_encoding=winobj->encoding; |
| return (PyObject*)winobj; |
Why is it problematic? Because PyCursesWindow_New can return NULL here:
| if (wo->encoding==NULL) { |
| Py_DECREF(wo); |
| PyErr_NoMemory(); |
| returnNULL; |
| } |
So, winobj->encoding of NULL is not good :(
I will send a PR.
Linked PRs
Bug report
Here's the problematic code:
cpython/Modules/_cursesmodule.c
Lines 3365 to 3367 in a2d0818
Why is it problematic? Because
PyCursesWindow_Newcan returnNULLhere:cpython/Modules/_cursesmodule.c
Lines 708 to 712 in a2d0818
So,
winobj->encodingofNULLis not good :(I will send a PR.
Linked PRs
NULLhandling in_curses_initscr_implof_cursesmodule#123914