[issue7561] PyByteArray_AS_STRING used unsafely

2010-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: The bytearray fix has been committed in r77573 (trunk), r77574 (2.6), r77576 (py3k), r77577 (3.1). The issue can now be closed. -- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed __

[issue7561] PyByteArray_AS_STRING used unsafely

2010-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: (I meant the posixmodule fix, of course) -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue7561] PyByteArray_AS_STRING used unsafely

2010-01-17 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file15663/release_bytes.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue7561] PyByteArray_AS_STRING used unsafely

2010-01-17 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file15660/posixmodule_fn_bytearray_fix_01.patch ___ Python tracker ___ ___ Py

[issue7561] PyByteArray_AS_STRING used unsafely

2010-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: The posixmodule was committed with a test in r77571 (py3k) and r77572 (3.1). -- ___ Python tracker ___ _

[issue7561] PyByteArray_AS_STRING used unsafely

2010-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. A static empty string is used in case PyByteArray_AS_STRING() is asked on an empty bytearray, instead of returning NULL. Another possibility would be to implement tp_new for bytearray and always allocate a new 1-byte string, but this would ma

[issue7561] PyByteArray_AS_STRING used unsafely

2009-12-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: IMO bytearray should be fixed, for everyone else's sanity. -- nosy: +benjamin.peterson, georg.brandl, pitrou ___ Python tracker ___

[issue7561] PyByteArray_AS_STRING used unsafely

2009-12-29 Thread Mark Dickinson
Mark Dickinson added the comment: Having the ob_bytes field be NULL for a bytearray seems like a strange choice; does anyone know why bytearray was designed this way? Is it mainly for ease of combination with the stringlib library? There does seem to be an awful lot of code that acts as tho

[issue7561] PyByteArray_AS_STRING used unsafely

2009-12-24 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue7561] PyByteArray_AS_STRING used unsafely

2009-12-23 Thread R. David Murray
Changes by R. David Murray : -- components: +Interpreter Core priority: high -> critical title: Filename-taking functions in posix segfault when called with a bytearray arg. -> PyByteArray_AS_STRING used unsafely ___ Python tracker