mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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.
This commit is contained in:
parent
d82fb78b5c
commit
355bc0c88e
1 changed files with 3 additions and 1 deletions
|
@ -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+/";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue