[Python-checkins] CVS: python/dist/src/Modules binascii.c,2.31,2.32
Guido van Rossum
gvanrossum@users.sourceforge.net
Mon, 29 Oct 2001 19:00:55 -0800
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv16248
Modified Files:
binascii.c
Log Message:
Change the limit on the input size for b2a_base64 to what will fit in
memory, rather than the standard's 57.
This fixes SF bug #473009.
Index: binascii.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/binascii.c,v
retrieving revision 2.31
retrieving revision 2.32
diff -C2 -d -r2.31 -r2.32
*** binascii.c 2001/10/04 14:54:53 2.31
--- binascii.c 2001/10/30 03:00:52 2.32
***************
*** 136,140 ****
#define BASE64_PAD '='
! #define BASE64_MAXBIN 57 /* Max binary chunk size (76 char line) */
static unsigned char table_b2a_base64[] =
--- 136,142 ----
#define BASE64_PAD '='
!
! /* Max binary chunk size; limited only by available memory */
! #define BASE64_MAXBIN (INT_MAX/2 - sizeof(PyStringObject))
static unsigned char table_b2a_base64[] =