RTSP: fix stack use after scope error reported by ASan

Bug: 14077
Change-Id: I9fa0e62fe354b1c18687ba9041029de97719343c
Reviewed-on: https://code.wireshark.org/review/23635
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
This commit is contained in:
Pascal Quantin 2017-09-20 10:14:56 +02:00
parent f9207b0f6c
commit e27870eaa6
1 changed files with 1 additions and 3 deletions

View File

@ -530,6 +530,7 @@ rtsp_create_conversation(packet_info *pinfo, proto_item *ti,
gboolean is_video = FALSE; /* FIX ME - need to indicate video or not */
address src_addr;
address dst_addr;
guint32 ip4_addr;
if (rtsp_type_packet != RTSP_REPLY) {
return;
@ -599,7 +600,6 @@ rtsp_create_conversation(packet_info *pinfo, proto_item *ti,
else if (sscanf(tmp, "\"%u.%u.%u.%u:%u\"", &ipv4_1, &ipv4_2, &ipv4_3, &ipv4_4, &s_data_port) == 5) {
guchar *tmp2;
guchar *tmp3;
guint32 ip4_addr;
/* Skip leading " */
tmp++;
@ -616,7 +616,6 @@ rtsp_create_conversation(packet_info *pinfo, proto_item *ti,
else if (sscanf(tmp, "\"%u.%u.%u.%u\"", &ipv4_1, &ipv4_2, &ipv4_3, &ipv4_4) == 4) {
guchar *tmp2;
guchar *tmp3;
guint32 ip4_addr;
/* Skip leading " */
tmp++;
@ -651,7 +650,6 @@ rtsp_create_conversation(packet_info *pinfo, proto_item *ti,
if (sscanf(tmp, "\"%u.%u.%u.%u:%u\"", &ipv4_1, &ipv4_2, &ipv4_3, &ipv4_4, &c_data_port) == 5) {
guchar *tmp2;
guchar *tmp3;
guint32 ip4_addr;
/* Skip leading " */
tmp++;