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>
This commit is contained in:
Dario Lombardo 2018-04-03 21:39:02 +02:00 committed by Alexis La Goutte
parent 3a928f1f87
commit b132e8253f
1 changed files with 1 additions and 1 deletions

View File

@ -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 */