Patch free-memory-about-content-disposition for mailparse Bug #74233
Patch version 2017-03-13 07:24 UTC
Return to Bug #74233 |
Download this patch
Patch Revisions:
Developer: naoki-kawamukai@cybozu.co.jp
diff --git php_mailparse_mime.c php_mailparse_mime.c
index 0cc7ff6..51125f8 100644
--- php_mailparse_mime.c
+++ php_mailparse_mime.c
@@ -493,6 +493,10 @@ static int php_mimepart_process_header(php_mimepart *part)
}
}
if (strcmp(header_key, "content-disposition") == 0) {
+ if (part->content_disposition) {
+ php_mimeheader_free(part->content_disposition);
+ part->content_disposition = NULL;
+ }
part->content_disposition = php_mimeheader_alloc_from_tok(toks);
}
|