[issue12755] Service application crash in python25!PyObject_Malloc

Chandra Sekhar Reddy report at bugs.python.org
Wed Aug 17 09:27:11 CEST 2011


Chandra Sekhar Reddy <sanch09 at ca.com> added the comment:

Hi,

Thanks for your valuable feedback, 

As per your suggestion I have re-verified the code for the possibility of NULL values, intrestingly I have observed that buffer overrun is happening in our application, where there is a character array declared with size 200 and a string is being copied without considering the null terminating character.

static PyObject	*eError;
char errorString[200];
_snprintf(errorString, 200, "some message content");
PyErr_SetString(eError, errorString);

I am not 100% sure if this may cause the PyObject_Malloc to fail.

Thanks,
-Chandra

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12755>
_______________________________________


More information about the Python-bugs-list mailing list