diff options
Diffstat (limited to 'Modules/binascii.c')
-rw-r--r-- | Modules/binascii.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/binascii.c b/Modules/binascii.c index 51101b4..833283f 100644 --- a/Modules/binascii.c +++ b/Modules/binascii.c @@ -294,7 +294,7 @@ binascii_b2a_uu(PyObject *self, PyObject *args) } /* We're lazy and allocate to much (fixed up later) */ - if ( (rv=PyBytes_FromStringAndSize(NULL, bin_len*2+2)) == NULL ) { + if ( (rv=PyBytes_FromStringAndSize(NULL, 2 + (bin_len+2)/3*4)) == NULL ) { PyBuffer_Release(&pbin); return NULL; } |