Allocate transport_info->encoding_name from correct memory pool

Bug: 13127

Change-Id: I09893fadc6f64316a373ddb8ac72e07a6743e149
Reviewed-on: https://code.wireshark.org/review/18758
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Tested-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
novakji 2016-11-12 21:16:53 +01:00 committed by Michael Mann
parent efe95fa8fd
commit 5b348a48e5
1 changed files with 4 additions and 2 deletions

View File

@ -1402,7 +1402,8 @@ static void dissect_sdp_media_attribute(tvbuff_t *tvb, packet_info *pinfo, proto
return; /* Invalid */
}
transport_info->encoding_name[pt] = (char*)tvb_get_string_enc(wmem_packet_scope(), tvb, offset, tokenlen, ENC_UTF_8|ENC_NA);
/* String is file scope allocated because transport_info is connection related */
transport_info->encoding_name[pt] = (char*)tvb_get_string_enc(wmem_file_scope(), tvb, offset, tokenlen, ENC_UTF_8|ENC_NA);
next_offset = next_offset + 1;
offset = next_offset;
@ -1947,7 +1948,8 @@ setup_sdp_transport(tvbuff_t *tvb, packet_info *pinfo, enum sdp_exchange_type ex
transport_info->media_count = -1;
for (n = 0; n < SDP_NO_OF_PT; n++) {
transport_info->encoding_name[n] = wmem_strdup(wmem_packet_scope(), UNKNOWN_ENCODING);
/* String is file scope allocated because transport_info is connection related */
transport_info->encoding_name[n] = wmem_strdup(wmem_file_scope(), UNKNOWN_ENCODING);
}
for (n = 0; n < SDP_MAX_RTP_CHANNELS; n++) {
transport_info->media[n].rtp_dyn_payload = rtp_dyn_payload_new();