thread: Add check for valid CoAP info
Add a check for valid CoAP info in dissect_thread_coap() before use. It may happen that this is NULL because setting a decode_as rule for application/octet-stream will also catch other packets.
This commit is contained in:
parent
88b0370f86
commit
a750cab655
|
@ -2105,6 +2105,10 @@ dissect_thread_coap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d
|
|||
|
||||
/* Obtain the CoAP info */
|
||||
coinfo = (coap_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_coap, 0);
|
||||
|
||||
/* Reject the packet if not CoAP */
|
||||
if (!coinfo) return 0;
|
||||
|
||||
uri = wmem_strbuf_get_str(coinfo->uri_str_strbuf);
|
||||
|
||||
tokens = wmem_strsplit(wmem_packet_scope(), uri, "/", 3);
|
||||
|
|
Loading…
Reference in New Issue