[issue29873] Need a look for return value checking [_elementtree.c]

2017-03-21 Thread Alex CHEN
New submission from Alex CHEN: In file _elementtree.c our static code scanner has reported this case, but I don't sure that could be any problem, may you have a look? static PyObject* element_getattr(ElementObject* self, char* name) { PyObject* res; /* handle common attributes

[issue29874] Need a look for return value checking [selectmodule.c]

2017-03-21 Thread Alex CHEN
New submission from Alex CHEN: In file selectmodule.c our static code scanner has reported the following case, function set2list is liable to return NULL (if PyTuple_New failed), would any chance the NULL pointer be dereferenced (Py_DECREF(fdlist) after set2list) or it would just raise

[issue29874] Need a look for return value checking [selectmodule.c]

2017-03-21 Thread Alex CHEN
Changes by Alex CHEN <al...@sbrella.com>: -- type: -> crash ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29874> ___ ___

[issue29876] Check for null return value [_elementtree.c : subelement]

2017-03-21 Thread Alex CHEN
New submission from Alex CHEN: In file _elementtree.c our static code scanner has reported this case, I think there is a bit similar to http://bugs.python.org/issue29874 (returns NULL when NoMemory) static PyObject* subelement(PyObject* self, PyObject* args, PyObject* kw) { PyObject* elem

[issue29682] Checks for null return value

2017-02-28 Thread Alex CHEN
New submission from Alex CHEN: Hi, Our tool reported a position that doesn't check for returned value (from a function that might returns null). might need a look that is there any problem or I am missing something. in function PyUnknownEncodingHandler of file pyexpat.c