changeset: 98739:03646293f1b3 user: Victor Stinner date: Wed Oct 14 09:47:23 2015 +0200 files: Objects/longobject.c description: Fix long_format_binary() Issue #25399: Fix long_format_binary(), allocate bytes for the bytes writer. diff -r 9ab61ec2934c -r 03646293f1b3 Objects/longobject.c --- a/Objects/longobject.c Tue Oct 13 22:09:34 2015 -0400 +++ b/Objects/longobject.c Wed Oct 14 09:47:23 2015 +0200 @@ -1836,7 +1836,7 @@ kind = writer->kind; v = NULL; } - else if (writer) { + else if (bytes_writer) { *bytes_str = _PyBytesWriter_Prepare(bytes_writer, *bytes_str, sz); if (*bytes_str == NULL) return -1;