forked from osmocom/wireshark
Fix: Malformed packet if port is missing from path.
svn path=/trunk/; revision=33209
This commit is contained in:
parent
db4a00b4e4
commit
326ec92f7c
|
@ -1686,17 +1686,19 @@ static void dissect_sdp_media_attribute(tvbuff_t *tvb, packet_info *pinfo, proto
|
|||
|
||||
/* Port is after next ':' */
|
||||
port_offset = tvb_find_guint8(tvb, address_offset, -1, ':');
|
||||
/* Check if port is present if not skipp */
|
||||
if(port_offset!=-1){
|
||||
/* Port ends with '/' */
|
||||
port_end_offset = tvb_find_guint8(tvb, port_offset, -1, '/');
|
||||
|
||||
/* Port ends with '/' */
|
||||
port_end_offset = tvb_find_guint8(tvb, port_offset, -1, '/');
|
||||
|
||||
/* Attempt to convert address */
|
||||
if (inet_pton(AF_INET, (char*)tvb_get_ephemeral_string(tvb, address_offset, port_offset-address_offset), &msrp_ipaddr) > 0) {
|
||||
/* Get port number */
|
||||
msrp_port_number = atoi((char*)tvb_get_ephemeral_string(tvb, port_offset+1, port_end_offset-port_offset-1));
|
||||
/* Set flag so this info can be used */
|
||||
msrp_transport_address_set = TRUE;
|
||||
}
|
||||
/* Attempt to convert address */
|
||||
if (inet_pton(AF_INET, (char*)tvb_get_ephemeral_string(tvb, address_offset, port_offset-address_offset), &msrp_ipaddr) > 0) {
|
||||
/* Get port number */
|
||||
msrp_port_number = atoi((char*)tvb_get_ephemeral_string(tvb, port_offset+1, port_end_offset-port_offset-1));
|
||||
/* Set flag so this info can be used */
|
||||
msrp_transport_address_set = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SDP_H248_ITEM:
|
||||
|
|
Loading…
Reference in New Issue