mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-22 23:35:13 +03:00
Merge pull request #508 from kabeer27/improving-pdu-fuzzer
[Oss-Fuzz] Improving pdu_parse_fuzzer
This commit is contained in:
1 file changed
+6
@@ -6,7 +6,13 @@ LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
if (pdu) {
|
||||
coap_set_log_level(LOG_DEBUG);
|
||||
coap_pdu_parse(COAP_PROTO_UDP, data, size, pdu);
|
||||
coap_string_t *query = coap_get_query(pdu);
|
||||
coap_string_t *uri_path = coap_get_uri_path(pdu);
|
||||
coap_show_pdu(LOG_DEBUG, pdu);
|
||||
coap_pdu_encode_header(pdu, COAP_PROTO_UDP);
|
||||
|
||||
coap_delete_string(query);
|
||||
coap_delete_string(uri_path);
|
||||
coap_delete_pdu(pdu);
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in new issue
Block a user