diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-11-26 09:23:06 +0100 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2015-11-26 08:36:02 +0000 |
commit | a9b4be98e90521e6c741eaf38716b3dc33192e11 (patch) | |
tree | 50abbcf4770517b3e17a869018ec43e674f08761 | |
parent | 682e3a6117981eaae009d44225fa80e69511364e (diff) | |
download | wireshark-a9b4be98e90521e6c741eaf38716b3dc33192e11.tar.gz wireshark-a9b4be98e90521e6c741eaf38716b3dc33192e11.tar.bz2 wireshark-a9b4be98e90521e6c741eaf38716b3dc33192e11.zip |
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.c | 14 |
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; |