Commit 5803c7b8 authored by George Hopkins's avatar George Hopkins Committed by Pascal Quantin

multipart: fix deallocation of invalid parts

Fixes #16741


(cherry picked from commit 2411eae9)
parent 5f59c69d
Pipeline #184826006 passed with stage
in 39 minutes and 56 seconds
......@@ -339,14 +339,13 @@ get_multipart_info(packet_info *pinfo, http_message_info_t *message_info)
parameters = unfold_and_compact_mime_header(message_info->media_str, &dummy);
start_boundary = ws_find_media_type_parameter(wmem_packet_scope(), parameters, "boundary");
if(!start_boundary) {
if (!start_boundary) {
return NULL;
}
if(strncmp(type, "multipart/encrypted", sizeof("multipart/encrypted")-1) == 0) {
if (strncmp(type, "multipart/encrypted", sizeof("multipart/encrypted") - 1) == 0) {
start_protocol = ws_find_media_type_parameter(wmem_packet_scope(), parameters, "protocol");
if(!start_protocol) {
g_free(start_boundary);
if (!start_protocol) {
return NULL;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment