Comment 7 for bug 911233

Revision history for this message
Jae-hyeon Park (jhyeon) wrote :

The segmentation fault occurs when index++ decodes a non-base64 part of the email text using its base64 decoder. This can happen when a header field is in a multi-line representation which contains a non-null whitespace-only line. index++ misinterprets this type of line as the end of the last header. If the content-transfer-encoding is base64, index++ starts to decode the rest of the header part as in base64 even if it is plain text.

The attached patch fixes this problem by modifying the header parser so that it correctly detects the end of the last header.