Issue #25270: Prevent codecs.escape_encode() from raising SystemError when an empty bytestring is passed

This commit is contained in:
Berker Peksag 2016-09-16 17:31:06 +03:00
parent a4961e555b
commit 4a72a7b6c4
4 changed files with 38 additions and 6 deletions

View file

@ -198,5 +198,5 @@ called with a non-bytes parameter.
desired. On success, *\*bytes* holds the resized bytes object and ``0`` is
returned; the address in *\*bytes* may differ from its input value. If the
reallocation fails, the original bytes object at *\*bytes* is deallocated,
*\*bytes* is set to *NULL*, a memory exception is set, and ``-1`` is
*\*bytes* is set to *NULL*, :exc:`MemoryError` is set, and ``-1`` is
returned.