Fix null dereference in packet-vj-comp.c
I missed testing that `conv` wasn't null before passing it to `conversation_get_proto_data()`. This fixes that. Fixes #17238.
This commit is contained in:
parent
2efed17b54
commit
1965109ec7
|
@ -446,12 +446,14 @@ dissect_vjc_comp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void*
|
|||
}
|
||||
}
|
||||
conv = vjc_find_conversation(pinfo, vjc_cnum, FALSE);
|
||||
if (NULL == conv) {
|
||||
if (NULL != conv) {
|
||||
pkt_data = (vjc_conv_t *)conversation_get_proto_data(conv, proto_vjc);
|
||||
// Will be testing that pkt_data exists below
|
||||
}
|
||||
else {
|
||||
proto_tree_add_expert(ti, pinfo, &ei_vjc_no_conversation,
|
||||
tvb, 1, (flags & VJC_FLAG_C) ? 1 : 0);
|
||||
}
|
||||
pkt_data = (vjc_conv_t *)conversation_get_proto_data(conv, proto_vjc);
|
||||
// Will be testing that pkt_data exists below
|
||||
|
||||
proto_tree_add_item_ret_uint(subtree, hf_vjc_chksum, tvb, offset, 2,
|
||||
ENC_BIG_ENDIAN, &tcp_chksum);
|
||||
|
|
Loading…
Reference in New Issue