[issue2587] PyString_FromStringAndSize() to be considered unsafe

Justin Ferguson report at bugs.python.org
Wed Apr 9 22:01:34 CEST 2008


Justin Ferguson <justin.ferguson at ioactive.com> added the comment:

> 1. If you change PyString_FromStringAndSize, you should change
> PyBytes_FromStringAndSize and PyUnicode_FromStringAndSize for
> consistency.

Okay, if we don't patch the API call itself, I will look at the users of
those two API calls as well, I haven't gone through much of the stuff in
Objects/ yet, I focused on the modules obviously and thus didn't know
about those calls.

> 4. You have clearly identified several bugs that are not covered by
> unittests.  If you fix them en-mass by making
> PyString_FromStringAndSize more forgiving, we will miss an opportunity
> to improve the test coverage. (If you take the SystemError approach,
> this does not apply.)

This is a valid and good point-- I don't mind either way

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


More information about the Python-bugs-list mailing list