зеркало из https://github.com/mozilla/pjs.git
Fix for bug 158334. Fix memory corruption created by using PL_strcat on a buffer not wide enough. R=varada, SR=bienvenu
This commit is contained in:
Родитель
ff0eff4507
Коммит
a5308866c4
|
@ -1833,7 +1833,14 @@ mime_decompose_file_init_fn ( void *stream_closure, MimeHeaders *headers )
|
|||
newAttachment->type = MimeHeaders_get ( headers, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE );
|
||||
|
||||
if (PL_strstr(newAttachment->type, MESSAGE_RFC822))
|
||||
PL_strcat(newAttachment->real_name, ".eml");
|
||||
{
|
||||
char *newName = PR_smprintf("%s.eml", newAttachment->real_name);
|
||||
if (newName)
|
||||
{
|
||||
PR_Free(newAttachment->real_name);
|
||||
newAttachment->real_name = newName;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// This is to handle the degenerated Apple Double attachment.
|
||||
|
|
Загрузка…
Ссылка в новой задаче