forked from osmocom/wireshark
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:
parent
3a928f1f87
commit
b132e8253f
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue