PDA

View Full Version : Incorrect Input Validation In PyString_FromStringAndSize() Leads to Multiple Buffer Overflows



newsbot
13-04-2008, 11:16 AM
The Python core API provides multiple functions for the allocation of string objects, specifically providing an API call that allows for either the allocation or reallocation of a PyStringObject. This function, PyString_FromStringAndSize() takes two parameters:a pointer and a signed integer. If the pointer is non-NULL then the memory pointed to it is reallocated to the size specified by the second parameter. If the pointer is NULL then the number of bytes specified by the integer are allocated and returned.

http://www.securiteam.com/unixfocus/5PP0D0UO0E.html