(Fbase64_encode_string): Allocate sufficient memory for
newlines added when the arg NO-LINE-BREAK is nil.
This commit is contained in:
parent
e4a225a97d
commit
7f8a084075
1 changed files with 5 additions and 1 deletions
|
@ -2910,8 +2910,12 @@ into shorter lines.")
|
|||
|
||||
CHECK_STRING (string, 1);
|
||||
|
||||
/* We need to allocate enough room for encoding the text.
|
||||
We need 33 1/3% more space, plus a newline every 76
|
||||
characters, and then we round up. */
|
||||
length = STRING_BYTES (XSTRING (string));
|
||||
allength = length + length/3 + 1 + 6;
|
||||
allength = length + length/3 + 1;
|
||||
allength += allength / MIME_LINE_LENGTH + 1 + 6;
|
||||
|
||||
/* We need to allocate enough room for decoding the text. */
|
||||
if (allength <= MAX_ALLOCA)
|
||||
|
|
Loading…
Add table
Reference in a new issue