Not passing a struct atm_phdr to an ATM dissector is a bug.

Check for it with DISSECTOR_ASSERT().

Change-Id: I71ba81107f7a4aff21b0f0dbecb5158dc4ff6238
Reviewed-on: https://code.wireshark.org/review/13318
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2016-01-15 13:35:38 -08:00
parent a9e126a617
commit d89de40449
1 changed files with 4 additions and 12 deletions

View File

@ -1644,9 +1644,7 @@ dissect_atm_truncated(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
{
struct atm_phdr *atm_info = (struct atm_phdr *)data;
if (!atm_info) {
return 0;
}
DISSECTOR_ASSERT(atm_info != NULL);
return dissect_atm_common(tvb, pinfo, tree, TRUE, atm_info, FALSE);
}
@ -1656,9 +1654,7 @@ dissect_atm_pw_truncated(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
{
struct atm_phdr *atm_info = (struct atm_phdr *)data;
if (!atm_info) {
return 0;
}
DISSECTOR_ASSERT(atm_info != NULL);
return dissect_atm_common(tvb, pinfo, tree, TRUE, atm_info, TRUE);
}
@ -1668,9 +1664,7 @@ dissect_atm_untruncated(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
{
struct atm_phdr *atm_info = (struct atm_phdr *)data;
if (!atm_info) {
return 0;
}
DISSECTOR_ASSERT(atm_info != NULL);
return dissect_atm_common(tvb, pinfo, tree, FALSE, atm_info, FALSE);
}
@ -1680,9 +1674,7 @@ dissect_atm_pw_untruncated(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
{
struct atm_phdr *atm_info = (struct atm_phdr *)data;
if (!atm_info) {
return 0;
}
DISSECTOR_ASSERT(atm_info != NULL);
return dissect_atm_common(tvb, pinfo, tree, FALSE, atm_info, TRUE);
}