diff options
Diffstat (limited to 'Modules/binascii.c')
-rw-r--r-- | Modules/binascii.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/binascii.c b/Modules/binascii.c index 4ddea56..643450c 100644 --- a/Modules/binascii.c +++ b/Modules/binascii.c @@ -135,7 +135,9 @@ static char table_a2b_base64[] = { }; #define BASE64_PAD '=' -#define BASE64_MAXBIN 57 /* Max binary chunk size (76 char line) */ + +/* Max binary chunk size; limited only by available memory */ +#define BASE64_MAXBIN (INT_MAX/2 - sizeof(PyStringObject)) static unsigned char table_b2a_base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; |