forked from osmocom/wireshark
RTP: fix a possible NULL pointer dereference (CID 1397705 & 1397706)
As those dissectors are registered by name, let's not make the assumption that rtp_info is always present. Change-Id: I959b8c71485471b3be4cd2e71a6d96c2d4b278ff Reviewed-on: https://code.wireshark.org/review/19381 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
b3b23ff134
commit
61d2c8f4a4
|
@ -2476,7 +2476,7 @@ static char *ed137_squ_only = "SQU";
|
||||||
static char *ed137_ptt_and_squ = "PTT+SQU";
|
static char *ed137_ptt_and_squ = "PTT+SQU";
|
||||||
|
|
||||||
static int
|
static int
|
||||||
dissect_rtp_hdr_ext_ed137(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ )
|
dissect_rtp_hdr_ext_ed137(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
|
||||||
{
|
{
|
||||||
unsigned int hdr_extension_len;
|
unsigned int hdr_extension_len;
|
||||||
struct _rtp_info *rtp_info=(struct _rtp_info *)data;
|
struct _rtp_info *rtp_info=(struct _rtp_info *)data;
|
||||||
|
@ -2491,7 +2491,9 @@ dissect_rtp_hdr_ext_ed137(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
|
||||||
gboolean ed137_ptt = FALSE;
|
gboolean ed137_ptt = FALSE;
|
||||||
gboolean ed137_squ = FALSE;
|
gboolean ed137_squ = FALSE;
|
||||||
|
|
||||||
rtp_info->info_is_ed137 = TRUE;
|
if (rtp_info != NULL) {
|
||||||
|
rtp_info->info_is_ed137 = TRUE;
|
||||||
|
}
|
||||||
if ( tree ) {
|
if ( tree ) {
|
||||||
proto_item *ti;
|
proto_item *ti;
|
||||||
ti = proto_tree_add_item(tree, hf_rtp_hdr_ed137s, tvb, offset, hdr_extension_len * 4, ENC_NA);
|
ti = proto_tree_add_item(tree, hf_rtp_hdr_ed137s, tvb, offset, hdr_extension_len * 4, ENC_NA);
|
||||||
|
@ -2590,7 +2592,7 @@ dissect_rtp_hdr_ext_ed137(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
dissect_rtp_hdr_ext_ed137a(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ )
|
dissect_rtp_hdr_ext_ed137a(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
|
||||||
{
|
{
|
||||||
unsigned int hdr_extension_len;
|
unsigned int hdr_extension_len;
|
||||||
struct _rtp_info *rtp_info=(struct _rtp_info *)data;
|
struct _rtp_info *rtp_info=(struct _rtp_info *)data;
|
||||||
|
@ -2605,7 +2607,9 @@ dissect_rtp_hdr_ext_ed137a(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
gboolean ed137_ptt = FALSE;
|
gboolean ed137_ptt = FALSE;
|
||||||
gboolean ed137_squ = FALSE;
|
gboolean ed137_squ = FALSE;
|
||||||
|
|
||||||
rtp_info->info_is_ed137 = TRUE;
|
if (rtp_info != NULL) {
|
||||||
|
rtp_info->info_is_ed137 = TRUE;
|
||||||
|
}
|
||||||
if ( tree ) {
|
if ( tree ) {
|
||||||
proto_item *ti;
|
proto_item *ti;
|
||||||
ti = proto_tree_add_item(tree, hf_rtp_hdr_ed137s, tvb, offset, hdr_extension_len * 4, ENC_NA);
|
ti = proto_tree_add_item(tree, hf_rtp_hdr_ed137s, tvb, offset, hdr_extension_len * 4, ENC_NA);
|
||||||
|
|
Loading…
Reference in New Issue