New submission from Alexey Izbyshev <izbys...@ispras.ru>:
The code at https://github.com/python/cpython/blob/28853a249b1d0c890b7e9ca345290bb8c1756446/Modules/_xxsubinterpretersmodule.c#L18 checks a wrong variable for NULL: const char *str = PyUnicode_AsUTF8(strobj); if (str == NULL) { return NULL; } char *copied = PyMem_Malloc(strlen(str)+1); if (str == NULL) { PyErr_NoMemory(); return NULL; } Reported by Svace static analyzer. ---------- components: Extension Modules messages: 323897 nosy: eric.snow, izbyshev, serhiy.storchaka priority: normal severity: normal status: open title: _xxsubinterpreters: Wrong NULL check in _copy_raw_string() type: behavior versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34462> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com