[issue2587] PyString_FromStringAndSize() to be considered unsane

Amaury Forgeot d'Arc report at bugs.python.org
Tue Apr 8 18:17:13 CEST 2008


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

This is done already:
the second line in PyString_FromStringAndSize() is
    assert(size>=0);
You have to build python in debug mode though...

Oh, I realize this is not a real patch: no error is raised, and why
PYSSIZE_T_MAX/sizeof(PyStringObject), when the allocation is    
PyObject_MALLOC(sizeof(PyStringObject)+size)?

----------
nosy: +amaury.forgeotdarc

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2587>
__________________________________


More information about the Python-bugs-list mailing list