misc: fuzz: extend msg parsing fuzzer
authorDavid Korczynski <david@adalogics.com>
Mon, 13 Sep 2021 10:19:28 +0000 (11:19 +0100)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Tue, 14 Sep 2021 08:11:18 +0000 (10:11 +0200)
misc/fuzz/fuzz_parse_msg.c

index ef656ab..8de9175 100644 (file)
@@ -6,6 +6,8 @@
 #include "../parser/parse_ppi_pai.h"
 #include "../parser/parse_privacy.h"
 #include "../parser/parse_diversion.h"
+#include "../parser/parse_identityinfo.h"
+#include "../parser/parse_disposition.h"
 
 int LLVMFuzzerInitialize(int *argc, char ***argv) {
     ksr_hname_init_index();
@@ -37,6 +39,16 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
 
     parse_privacy(&orig_inv);
 
+    parse_content_disposition(&orig_inv);
+
+    parse_identityinfo_header(&orig_inv);
+
+    str uri;
+    get_src_uri(&orig_inv, 0, &uri);
+
+    str ssock;
+    get_src_address_socket(&orig_inv, &ssock);
+
 cleanup:
     free_sip_msg(&orig_inv);