mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
fix crash detaching attachment w/o content type, 301864, sr=mscott, a=bsmedberg
This commit is contained in:
parent
3c4d14a368
commit
8c84ba7125
@ -264,9 +264,12 @@ MimeMultipart_parse_line (char *line, PRInt32 length, MimeObject *obj)
|
||||
if (detachingPart)
|
||||
{
|
||||
char *contentType = MimeHeaders_get(mult->hdrs, "Content-Type", PR_FALSE, PR_FALSE);
|
||||
MimeWriteAString(obj, NS_LITERAL_CSTRING("Content-Type: "));
|
||||
MimeWriteAString(obj, nsDependentCString(contentType));
|
||||
PR_Free(contentType);
|
||||
if (contentType)
|
||||
{
|
||||
MimeWriteAString(obj, NS_LITERAL_CSTRING("Content-Type: "));
|
||||
MimeWriteAString(obj, nsDependentCString(contentType));
|
||||
PR_Free(contentType);
|
||||
}
|
||||
char *contentEncoding = MimeHeaders_get(mult->hdrs, "Content-Transfer-Encoding", PR_FALSE, PR_FALSE);
|
||||
if (contentEncoding)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user