summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-11-26 09:23:06 +0100
committerPascal Quantin <pascal.quantin@gmail.com>2015-11-26 08:36:02 +0000
commita9b4be98e90521e6c741eaf38716b3dc33192e11 (patch)
tree50abbcf4770517b3e17a869018ec43e674f08761
parent682e3a6117981eaae009d44225fa80e69511364e (diff)
downloadwireshark-a9b4be98e90521e6c741eaf38716b3dc33192e11.tar.gz
SCTP: add another NULL dereference check
This is a follow-up of g2259bf8 Change-Id: I4dfb839fcd016a8d7a7210e6358d230025eb96a3 Reviewed-on: https://code.wireshark.org/review/12171 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> (cherry picked from commit 1b32d505a59475d51d9b2bed5f0869d2d154e8b6) Reviewed-on: https://code.wireshark.org/review/12172
-rw-r--r--epan/dissectors/packet-sctp.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c
index 6c042af189..19900ffc32 100644
--- a/epan/dissectors/packet-sctp.c
+++ b/epan/dissectors/packet-sctp.c
@@ -3241,12 +3241,14 @@ dissect_fragmented_payload(tvbuff_t *payload_tvb, packet_info *pinfo, proto_tree
cur = wmem_list_tail(pinfo->layers);
retval = dissect_payload(new_tvb, pinfo, tree, ppi);
cur = wmem_list_frame_next(cur);
- tmp = wmem_list_frame_data(cur);
- proto_id = GPOINTER_TO_UINT(tmp);
- proto_name = proto_get_protocol_filter_name(proto_id);
- if(strcmp(proto_name, "data") != 0){
- if (have_tap_listener(exported_pdu_tap)){
- export_sctp_data_chunk(pinfo,payload_tvb, proto_name);
+ if (cur) {
+ tmp = wmem_list_frame_data(cur);
+ proto_id = GPOINTER_TO_UINT(tmp);
+ proto_name = proto_get_protocol_filter_name(proto_id);
+ if(strcmp(proto_name, "data") != 0){
+ if (have_tap_listener(exported_pdu_tap)){
+ export_sctp_data_chunk(pinfo,payload_tvb, proto_name);
+ }
}
}
return retval;