[issue4416] state_reset not called on 'state' before sre_search invoked

2008-12-10 Thread Brian Szuter
Brian Szuter <[EMAIL PROTECTED]> added the comment: This bug was found using a research tool that finds potential neglected condition bugs by examining a code base, deducing rules from the code base, and finding violations of those rules. I have not attempted to demonstrate a problem v

[issue4416] state_reset not called on 'state' before sre_search invoked

2008-12-10 Thread Brian Szuter
Changes by Brian Szuter <[EMAIL PROTECTED]>: -- versions: +Python 2.7 -Python 2.5.3 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4416] state_reset not called on 'state' before sre_search invoked

2008-12-10 Thread Brian Szuter
Brian Szuter <[EMAIL PROTECTED]> added the comment: Examples: /Python-2.5.2/Modules/_sre.c Lines 3289 - 3297 (scanner_search) /Python-2.5.2/Modules/_sre.c Lines 2349 - 2357 (pattern_subx) /Python-2.5.2/Modules/_sre.c Lines 2197 - 2205 (pattern_split) /Python-2.5.2/Modules/_sre.c Line

[issue4467] return value of PyUnicode_AsEncodedString() is not checked for NULL

2008-11-29 Thread Brian Szuter
New submission from Brian Szuter <[EMAIL PROTECTED]>: Python-2.5.2/Objects/unicodeobject.c(unicode_str) Line 6816 The return value of PyUnicode_AsEncodedString() is not checked for NULL. According to http://www.python.org/doc/2.5.2/api/builtinCodecs.html#l2h-519 this indicates an exc

[issue4466] The return value of PyFile_FromFile is not checked for NULL

2008-11-29 Thread Brian Szuter
New submission from Brian Szuter <[EMAIL PROTECTED]>: Python-2.5.2/Modules/posixmodule.c(posix_tmpfile) Line 6841 The return value of PyFile_FromFile is not checked for NULL See the following where it is checked: tokenizer.c(fp_setreadl) 429 fileobject.c(PyFile_FromString) 300 posixmo

[issue4460] The parameter of PyInt_AsSsize_t() is not checked to see if it is NULL

2008-11-29 Thread Brian Szuter
Brian Szuter <[EMAIL PROTECTED]> added the comment: abstract.c(PyNumber_AsSsize_t) shows this check of PyInt_AsSsize_t()'s parameter: 980:if (value == NULL) 981:return -1; 982: 983:/* We're done if PyInt_AsSsize_t() returns without error. */

[issue4465] The result of set_copy() is not checked for NULL

2008-11-29 Thread Brian Szuter
New submission from Brian Szuter <[EMAIL PROTECTED]>: Python-2.5.2/Objects/setobject.c Line 1204 The result of set_copy() is not checked for NULL. [See Objects/setobject.c(set_difference) for example of correct usage] -- components: None messages: 76606 nosy: CWRU_Researcher1 se

[issue4464] PyList_GetItem() result and parameters not fully validated

2008-11-29 Thread Brian Szuter
New submission from Brian Szuter <[EMAIL PROTECTED]>: Python-2.5.2/Python/codecs.c(_PyCodec_Lookup) Lines 106, 144 PyString_Check() is not called on the result of PyList_GetItem() and the first parameter of PyList_GetItem() does not have PyList_Check() called on it. (See Python-2.5.2/

[issue4463] Parameters and result of PyList_GetItem() are not validated

2008-11-29 Thread Brian Szuter
New submission from Brian Szuter <[EMAIL PROTECTED]>: Python-2.5.2/Python/import.c(get_path_importer) Lines 1079 PyString_Check() is not called on the result of PyList_GetItem() and the parameters of PyList_GetItem() are not validated before the method is called. -- components

[issue4462] result of PyList_GetItem() not validated

2008-11-29 Thread Brian Szuter
New submission from Brian Szuter <[EMAIL PROTECTED]>: Python-2.5.2/Python/import.c(find_module) Lines 1171 PyString_Check() is not called on the result of PyList_GetItem(), nor is the result checked to see if it is NULL. -- components: None messages: 76603 nosy: CWRU_Resea

[issue4461] parameters of PyLong_FromString() are not checked for NULL

2008-11-29 Thread Brian Szuter
New submission from Brian Szuter <[EMAIL PROTECTED]>: Python-2.5.2/Python/ast.c(parsenumber) Line 3061 The parameters of PyLong_FromString() are not checked for NULL before the method is called. -- components: None messages: 76602 nosy: CWRU_Researcher1 severity: normal status

[issue4460] The parameter of PyInt_AsSsize_t() is not checked to see if it is NULL

2008-11-29 Thread Brian Szuter
New submission from Brian Szuter <[EMAIL PROTECTED]>: Python-2.5.2/Modules/_sre.c(match_getindex) Line 2766 The parameter of PyInt_AsSsize_t() is not checked to see if it is NULL. -- components: None messages: 76600 nosy: CWRU_Researcher1 severity: normal status: open titl

[issue4422] Failed to check 3rd Param of PyArena_AddPyObject() to ensure it isn't NULL

2008-11-24 Thread Brian Szuter
New submission from Brian Szuter <[EMAIL PROTECTED]>: Python-2.5.2/Python/ast.c(alias_for_import_name) Line 2282, 2288 Failed to check 3rd Param of PyArena_AddPyObject() to ensure it isn't NULL -- components: None messages: 76385 nosy: CWRU_Researcher1 severity: normal s

[issue4421] Failed to check 3rd Param of PyArena_AddPyObject() to ensure it isn't NULL

2008-11-24 Thread Brian Szuter
New submission from Brian Szuter <[EMAIL PROTECTED]>: Python-2.5.2/Python/ast.c(new_identifier) Line 52 Failed to check 3rd Param of PyArena_AddPyObject() to ensure it isn't NULL -- components: None messages: 76384 nosy: CWRU_Researcher1 severity: normal status: open title

[issue4420] PyUnicode_Decode is not checked for NULL return value

2008-11-24 Thread Brian Szuter
New submission from Brian Szuter <[EMAIL PROTECTED]>: Python-2.5.2/Objects/unicodeobject.c(PyUnicodeUCS2_FromEncodedObject) Line 567 PyUnicode_Decode is not checked for NULL return value -- components: None messages: 76383 nosy: CWRU_Researcher1 severity: normal status: open

[issue4419] PyUnicode_DecodeUTF8 is not checked for NULL return value

2008-11-24 Thread Brian Szuter
New submission from Brian Szuter <[EMAIL PROTECTED]>: Python-2.5.2/Objects/unicodeobject.c Line 587 PyUnicode_DecodeUTF8 is not checked for NULL return value -- components: None messages: 76382 nosy: CWRU_Researcher1 severity: normal status: open title: PyUnicode_DecodeUTF8

[issue4418] PyObject_CallObject is not checked for NULL return value

2008-11-24 Thread Brian Szuter
Brian Szuter <[EMAIL PROTECTED]> added the comment: Python-2.5.2/Modules/_sre.c(join_list) Line 2023 PyObject_CallObject is not checked for NULL return value ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4418] PyObject_CallObject is not checked for NULL return value

2008-11-24 Thread Brian Szuter
New submission from Brian Szuter <[EMAIL PROTECTED]>: Python-2.5.2/Modules/_sre.c(PySequence_Fast) Line 1963 PyObject_CallObject is not checked for NULL return value -- messages: 76380 nosy: CWRU_Researcher1 severity: normal status: open title: PyObject_CallObject is not check

[issue4417] PySequence_List is not checked for NULL return value

2008-11-24 Thread Brian Szuter
New submission from Brian Szuter <[EMAIL PROTECTED]>: Python-2.5.2/Objects/abstract.c(PySequence_Fast) Line 1611 PySequence_List is not checked for NULL return value -- messages: 76379 nosy: CWRU_Researcher1 severity: normal status: open title: PySequence_List is not checked fo

[issue4416] state_reset not called on 'state' before sre_search invoked

2008-11-24 Thread Brian Szuter
New submission from Brian Szuter <[EMAIL PROTECTED]>: /home/rxc92/project/Python-2.5.2/Modules/_sre.c (pattern_search) Line 2740 Elsewhere in the codebase, state_reset is called on the first parameter of sre_search before sre_search is invoked. The does not occur here. -- comp

[issue4415] Failure to check return value of PyBool_FromLong for NULL

2008-11-24 Thread Brian Szuter
New submission from Brian Szuter <[EMAIL PROTECTED]>: /home/rxc92/project/Python-2.5.2/Python/import.c(imp_is_frozen) Line 2740 Failed to check that the return value of PyBool_FromLong is not NULL Referenced: http://www.python.org/doc/2.5.2/api/boolObjects.html#l2h-400 -- comp

[issue4414] Failure to check return value of PyBool_FromLong for NULL

2008-11-24 Thread Brian Szuter
New submission from Brian Szuter <[EMAIL PROTECTED]>: /home/rxc92/project/Python-2.5.2/Objects/unicodeobject.c(unicode_istitle) Line 5953 Failed to check that the return value of PyBool_FromLong is not NULL Referenced: http://www.python.org/doc/2.5.2/api/boolObjects.html#l

[issue4413] Failure to check PyUnicode_AsUTF8String() return value for NULL

2008-11-24 Thread Brian Szuter
New submission from Brian Szuter <[EMAIL PROTECTED]>: /home/rxc92/project/Python-2.5.2/Objects/unicodeobject.c(PyUnicodeUCS2_AsEncodedString) Line 699 Failed to check PyUnicode_AsUTF8String() for returning NULL. Referenced: http://www.python.org/doc/2.5.2/api/builtinCodecs.html#l

[issue4412] Failure to test return value of PyUnicode_AsUTF8String() for NULL

2008-11-24 Thread Brian Szuter
New submission from Brian Szuter <[EMAIL PROTECTED]>: /home/rxc92/project/Python-2.5.2/Parser/tokenizer.c (translate_into_utf8) Line 573 The return value of PyUnicode_AsUTF8String() is never checked if it is NULL. Reference: http://www.python.org/doc/2.5.2/api/builtinCodecs.html#l