mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-06 01:42:53 +03:00
pdu_parse_target: Add coap_show_pdu to test case
oss-fuzz: Added split_uri target oss-fuzz: Update usage of coap_show_pdu() in pdu_parse_target oss-fuzz: Fix split uri issue mentioned in #218 oss-fuzz: Set log level
This commit is contained in:
1 parent
552fc37cde
commit
0d78658ded
2 files changed
+10
No files matched your search
@@ -4,7 +4,9 @@ int
|
||||
LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
coap_pdu_t *pdu = coap_pdu_init(0, 0, 0, size);
|
||||
if (pdu) {
|
||||
coap_set_log_level(LOG_DEBUG);
|
||||
coap_pdu_parse(COAP_PROTO_UDP, data, size, pdu);
|
||||
coap_show_pdu(LOG_DEBUG, pdu);
|
||||
coap_delete_pdu(pdu);
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#include <coap2/coap.h>
|
||||
|
||||
int
|
||||
LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
coap_uri_t uri;
|
||||
coap_split_uri(data, size, &uri);
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user