aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rpcrdma.c
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2018-04-03 21:39:02 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2018-04-05 18:50:40 +0000
commitb132e8253f5d966a8b9ef035bdb0ee7a1128b729 (patch)
treeaaf5251cbbf07e52406d056cca99189957007af1 /epan/dissectors/packet-rpcrdma.c
parent3a928f1f879cfc63580181a316229733f8b81b0e (diff)
rpcrdma: add check to prevent null dereference (found by clang).
Change-Id: Iff3e3a348d40e42569135179953a957f9012fd3f Reviewed-on: https://code.wireshark.org/review/26730 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-rpcrdma.c')
-rw-r--r--epan/dissectors/packet-rpcrdma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-rpcrdma.c b/epan/dissectors/packet-rpcrdma.c
index 65129ce2e6..ab012389b1 100644
--- a/epan/dissectors/packet-rpcrdma.c
+++ b/epan/dissectors/packet-rpcrdma.c
@@ -1027,7 +1027,7 @@ process_rdma_list(tvbuff_t *tvb, guint offset, wmem_array_t *p_list,
/* Add data before the xdr position */
size = xdrpos - xdrprev - lenprev;
- if (size > 0 && tvb_captured_length_remaining(tvb, offset) > 0) {
+ if (size > 0 && tvb_captured_length_remaining(tvb, offset) > 0 && p_segment_info) {
tmp_tvb = tvb_new_subset_length(tvb, offset, size);
add_fragment(tmp_tvb, 0, p_segment_info->msgid, msg_num, TRUE, p_rdma_conv_info, pinfo, tree);
/* Message number for next fragment */