aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--asn1/h450/packet-h450-template.c33
-rw-r--r--asn1/h460/packet-h460-template.c17
-rw-r--r--epan/dissectors/packet-h264.c23
-rw-r--r--epan/dissectors/packet-h450.c37
-rw-r--r--epan/dissectors/packet-h460.c21
5 files changed, 86 insertions, 45 deletions
diff --git a/asn1/h450/packet-h450-template.c b/asn1/h450/packet-h450-template.c
index 544085709f..1aaa215d29 100644
--- a/asn1/h450/packet-h450-template.c
+++ b/asn1/h450/packet-h450-template.c
@@ -117,15 +117,18 @@ static const h450_err_t *get_err(gint32 errcode) {
static int
dissect_h450_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) {
proto_item *hidden_item;
- int offset;
- rose_ctx_t *rctx = get_rose_ctx(data);
+ int offset = 0;
+ rose_ctx_t *rctx;
gint32 opcode;
const h450_op_t *op_ptr;
const gchar *p;
- offset = 0;
-
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ rctx = get_rose_ctx(data);
DISSECTOR_ASSERT(rctx);
+
if (rctx->d.pdu != 1) /* invoke */
return offset;
if (rctx->d.code != 0) /* local */
@@ -159,15 +162,18 @@ dissect_h450_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
static int
dissect_h450_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) {
proto_item *hidden_item;
- int offset;
- rose_ctx_t *rctx = get_rose_ctx(data);
+ int offset = 0;
+ rose_ctx_t *rctx;
gint32 opcode;
const h450_op_t *op_ptr;
const gchar *p;
- offset = 0;
-
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ rctx = get_rose_ctx(data);
DISSECTOR_ASSERT(rctx);
+
if (rctx->d.pdu != 2) /* returnResult */
return offset;
if (rctx->d.code != 0) /* local */
@@ -201,15 +207,18 @@ dissect_h450_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
static int
dissect_h450_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) {
proto_item *hidden_item;
- int offset;
- rose_ctx_t *rctx = get_rose_ctx(data);
+ int offset = 0;
+ rose_ctx_t *rctx;
gint32 errcode;
const h450_err_t *err_ptr;
const gchar *p;
- offset = 0;
-
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ rctx = get_rose_ctx(data);
DISSECTOR_ASSERT(rctx);
+
if (rctx->d.pdu != 3) /* returnError */
return offset;
if (rctx->d.code != 0) /* local */
diff --git a/asn1/h460/packet-h460-template.c b/asn1/h460/packet-h460-template.c
index 03385dd10a..bf9e8f0a87 100644
--- a/asn1/h460/packet-h460-template.c
+++ b/asn1/h460/packet-h460-template.c
@@ -52,8 +52,8 @@ static int proto_h460 = -1;
#include "packet-h460-ett.c"
/* Subdissectors */
-static dissector_handle_t q931_ie_handle = NULL;
-static dissector_handle_t h225_ras_handle = NULL;
+static dissector_handle_t q931_ie_handle = NULL;
+static dissector_handle_t h225_ras_handle = NULL;
#include "packet-h460-fn.c"
@@ -68,7 +68,7 @@ dissect_ies(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
return offset;
}
-static int
+static int
dissect_ras(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) {
int offset = 0;
@@ -202,7 +202,7 @@ static h460_feature_t h460_feature_tab[] = {
{ GD|FD, "22/2", "ipsecSecurityProtocol", NULL, FFILL },
{ GD|FD, "22/2/1", "priority", NULL, FFILL },
{ 0, NULL, NULL, NULL, FFILL },
-};
+};
static h460_feature_t *find_ftr(const gchar *key) {
h460_feature_t *ftr = NULL;
@@ -221,10 +221,15 @@ static h460_feature_t *find_ftr(const gchar *key) {
static int
dissect_h460_name(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tree *tree, void *data) {
int offset = 0;
- asn1_ctx_t *actx = get_asn1_ctx(data);
+ asn1_ctx_t *actx;
h460_feature_t *ftr;
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ actx = get_asn1_ctx(data);
DISSECTOR_ASSERT(actx);
+
if (tree) {
/* DEBUG */ /*proto_tree_add_text(tree, tvb, 0, 0, "*** DEBUG dissect_h460_name: %s", pinfo->match_string);*/
ftr = find_ftr(pinfo->match_string);
@@ -271,7 +276,7 @@ void proto_register_h460(void) {
}
/*--- proto_reg_handoff_h460 -------------------------------------------*/
-void proto_reg_handoff_h460(void)
+void proto_reg_handoff_h460(void)
{
h460_feature_t *ftr;
dissector_handle_t h460_name_handle;
diff --git a/epan/dissectors/packet-h264.c b/epan/dissectors/packet-h264.c
index 01b287df62..1e39a27689 100644
--- a/epan/dissectors/packet-h264.c
+++ b/epan/dissectors/packet-h264.c
@@ -2017,13 +2017,17 @@ static const value_string h264_par_level_values[] = {
};
static int
-dissect_h264_par_level(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_)
+dissect_h264_par_level(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, void *data)
{
int offset = 0;
guint16 lvl;
const gchar *p;
- asn1_ctx_t *actx = get_asn1_ctx(data);
+ asn1_ctx_t *actx;
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ actx = get_asn1_ctx(data);
DISSECTOR_ASSERT(actx);
lvl = tvb_get_ntohs(tvb, offset);
@@ -2038,8 +2042,12 @@ dissect_h264_par_level(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _
static int
dissect_h264_par_DecoderConfigurationInformation(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
- asn1_ctx_t *actx = get_asn1_ctx(data);
+ asn1_ctx_t *actx;
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ actx = get_asn1_ctx(data);
DISSECTOR_ASSERT(actx);
dissect_h264_nal_unit(tvb, pinfo, tree);
@@ -2087,11 +2095,16 @@ static h264_capability_t *find_cap(const gchar *id) {
}
static int
-dissect_h264_name(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_h264_name(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tree *tree, void* data)
{
- asn1_ctx_t *actx = get_asn1_ctx(data);
+ asn1_ctx_t *actx;
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ actx = get_asn1_ctx(data);
DISSECTOR_ASSERT(actx);
+
if (tree) {
h264_capability_t *ftr;
ftr = find_cap(pinfo->match_string);
diff --git a/epan/dissectors/packet-h450.c b/epan/dissectors/packet-h450.c
index df9fd28104..d84ee83656 100644
--- a/epan/dissectors/packet-h450.c
+++ b/epan/dissectors/packet-h450.c
@@ -4711,15 +4711,18 @@ static const h450_err_t *get_err(gint32 errcode) {
static int
dissect_h450_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) {
proto_item *hidden_item;
- int offset;
- rose_ctx_t *rctx = get_rose_ctx(data);
+ int offset = 0;
+ rose_ctx_t *rctx;
gint32 opcode;
const h450_op_t *op_ptr;
const gchar *p;
- offset = 0;
-
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ rctx = get_rose_ctx(data);
DISSECTOR_ASSERT(rctx);
+
if (rctx->d.pdu != 1) /* invoke */
return offset;
if (rctx->d.code != 0) /* local */
@@ -4753,15 +4756,18 @@ dissect_h450_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
static int
dissect_h450_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) {
proto_item *hidden_item;
- int offset;
- rose_ctx_t *rctx = get_rose_ctx(data);
+ int offset = 0;
+ rose_ctx_t *rctx;
gint32 opcode;
const h450_op_t *op_ptr;
const gchar *p;
- offset = 0;
-
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ rctx = get_rose_ctx(data);
DISSECTOR_ASSERT(rctx);
+
if (rctx->d.pdu != 2) /* returnResult */
return offset;
if (rctx->d.code != 0) /* local */
@@ -4795,15 +4801,18 @@ dissect_h450_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
static int
dissect_h450_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) {
proto_item *hidden_item;
- int offset;
- rose_ctx_t *rctx = get_rose_ctx(data);
+ int offset = 0;
+ rose_ctx_t *rctx;
gint32 errcode;
const h450_err_t *err_ptr;
const gchar *p;
- offset = 0;
-
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ rctx = get_rose_ctx(data);
DISSECTOR_ASSERT(rctx);
+
if (rctx->d.pdu != 3) /* returnError */
return offset;
if (rctx->d.code != 0) /* local */
@@ -6277,7 +6286,7 @@ void proto_register_h450(void) {
NULL, HFILL }},
/*--- End of included file: packet-h450-hfarr.c ---*/
-#line 254 "../../asn1/h450/packet-h450-template.c"
+#line 263 "../../asn1/h450/packet-h450-template.c"
};
/* List of subtrees */
@@ -6457,7 +6466,7 @@ void proto_register_h450(void) {
&ett_h450_12_FeatureControl,
/*--- End of included file: packet-h450-ettarr.c ---*/
-#line 259 "../../asn1/h450/packet-h450-template.c"
+#line 268 "../../asn1/h450/packet-h450-template.c"
};
diff --git a/epan/dissectors/packet-h460.c b/epan/dissectors/packet-h460.c
index 564339d4ce..45f610ae77 100644
--- a/epan/dissectors/packet-h460.c
+++ b/epan/dissectors/packet-h460.c
@@ -359,8 +359,8 @@ static gint ett_h460_21_TransmitCapabilities = -1;
#line 53 "../../asn1/h460/packet-h460-template.c"
/* Subdissectors */
-static dissector_handle_t q931_ie_handle = NULL;
-static dissector_handle_t h225_ras_handle = NULL;
+static dissector_handle_t q931_ie_handle = NULL;
+static dissector_handle_t h225_ras_handle = NULL;
/*--- Included file: packet-h460-fn.c ---*/
@@ -1980,7 +1980,7 @@ dissect_ies(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
return offset;
}
-static int
+static int
dissect_ras(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) {
int offset = 0;
@@ -2114,7 +2114,7 @@ static h460_feature_t h460_feature_tab[] = {
{ GD|FD, "22/2", "ipsecSecurityProtocol", NULL, FFILL },
{ GD|FD, "22/2/1", "priority", NULL, FFILL },
{ 0, NULL, NULL, NULL, FFILL },
-};
+};
static h460_feature_t *find_ftr(const gchar *key) {
h460_feature_t *ftr = NULL;
@@ -2133,10 +2133,15 @@ static h460_feature_t *find_ftr(const gchar *key) {
static int
dissect_h460_name(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tree *tree, void *data) {
int offset = 0;
- asn1_ctx_t *actx = get_asn1_ctx(data);
+ asn1_ctx_t *actx;
h460_feature_t *ftr;
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ actx = get_asn1_ctx(data);
DISSECTOR_ASSERT(actx);
+
if (tree) {
/* DEBUG */ /*proto_tree_add_text(tree, tvb, 0, 0, "*** DEBUG dissect_h460_name: %s", pinfo->match_string);*/
ftr = find_ftr(pinfo->match_string);
@@ -2873,7 +2878,7 @@ void proto_register_h460(void) {
"UnicastAddress", HFILL }},
/*--- End of included file: packet-h460-hfarr.c ---*/
-#line 250 "../../asn1/h460/packet-h460-template.c"
+#line 255 "../../asn1/h460/packet-h460-template.c"
};
/* List of subtrees */
@@ -2972,7 +2977,7 @@ void proto_register_h460(void) {
&ett_h460_21_TransmitCapabilities,
/*--- End of included file: packet-h460-ettarr.c ---*/
-#line 255 "../../asn1/h460/packet-h460-template.c"
+#line 260 "../../asn1/h460/packet-h460-template.c"
};
/* Register protocol */
@@ -2992,7 +2997,7 @@ void proto_register_h460(void) {
}
/*--- proto_reg_handoff_h460 -------------------------------------------*/
-void proto_reg_handoff_h460(void)
+void proto_reg_handoff_h460(void)
{
h460_feature_t *ftr;
dissector_handle_t h460_name_handle;