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:
Bhargava Shastry authored and Bhargava Shastry committed 2019-05-24 11:01:53 +02:00
1 parent 552fc37cde
commit 0d78658ded
2 files changed
+10

No files matched your search

+2
View File
@@ -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;
+8
View File
@@ -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;
}