oss-fuzz/projects/opensips/patch.diff

66 lines
2.8 KiB
Diff

diff --git a/Makefile.conf.template b/Makefile.conf.template
index fcbc65ca1..1fd52ab7e 100644
--- a/Makefile.conf.template
+++ b/Makefile.conf.template
@@ -69,17 +69,19 @@ exclude_modules?= aaa_diameter aaa_radius auth_jwt b2b_logic_xml cachedb_cassand
include_modules?=
-DEFS+= -DPKG_MALLOC #Use a faster malloc
-DEFS+= -DSHM_MMAP #Use mmap instead of SYSV shared memory
-DEFS+= -DUSE_MCAST #Compile in support for IP Multicast
+#DEFS+= -DPKG_MALLOC #Use a faster malloc
+#DEFS+= -DSHM_MMAP #Use mmap instead of SYSV shared memory
+#DEFS+= -DUSE_MCAST #Compile in support for IP Multicast
DEFS+= -DDISABLE_NAGLE #Disable the TCP NAgle Algorithm ( lower delay )
DEFS+= -DSTATISTICS #Enable the statistics manager
+DEFS+= -DSYSTEM_MALLOC
+DEFS+= -DSHM_MMAP
DEFS+= -DHAVE_RESOLV_RES #Support for changing some of the resolver parameters
# Specifying exactly 1 allocator will cause it to be inlined (fastest)
-DEFS+= -DF_MALLOC #Fast memory allocator with minimal runtime overhead
-DEFS+= -DQ_MALLOC #Quality assurance memory allocator with runtime safety checks
-DEFS+= -DHP_MALLOC #High performance allocator with fine-grained locking
-DEFS+= -DDBG_MALLOC #Include additional, debug-enabled allocator flavors
+#DEFS+= -DF_MALLOC #Fast memory allocator with minimal runtime overhead
+#DEFS+= -DQ_MALLOC #Quality assurance memory allocator with runtime safety checks
+#DEFS+= -DHP_MALLOC #High performance allocator with fine-grained locking
+#DEFS+= -DDBG_MALLOC #Include additional, debug-enabled allocator flavors
#DEFS+= -DNO_DEBUG #Compile out all debug messages
#DEFS+= -DNO_LOG #Compile out all logging
#DEFS_GROUP_START
@@ -100,6 +102,6 @@ DEFS+= -DCC_O0 #Zero compiler optimizations (FAST compile, SLOW code. For devs)
#DEFS+= -DORACLE_USRLOC #Use Oracle compatible queries for USRLOC
#DEFS+= -DSHM_EXTRA_STATS #Provide tools to get extra statistics for the shared memory used
#DEFS+= -DUNIT_TESTS #Include unit testing code into opensips and modules
-#DEFS+= -DFUZZ_BUILD #Add extra runtime checks to prevent false-positive crashes
+DEFS+= -DFUZZ_BUILD #Add extra runtime checks to prevent false-positive crashes
PREFIX ?= /usr/local/
diff --git a/parser/msg_parser.c b/parser/msg_parser.c
index e85a94561..fbe914f59 100644
--- a/parser/msg_parser.c
+++ b/parser/msg_parser.c
@@ -271,7 +271,7 @@ error_bad_hdr:
set_err_reply(400, "bad headers");
error:
LM_DBG("error exit\n");
- update_stat( bad_msg_hdr, 1);
+ //update_stat( bad_msg_hdr, 1);
hdr->type=HDR_ERROR_T;
hdr->len=tmp-hdr->name.s;
return tmp;
diff --git a/parser/parse_uri.c b/parser/parse_uri.c
index c1d4bf0bc..17dd023ea 100644
--- a/parser/parse_uri.c
+++ b/parser/parse_uri.c
@@ -1630,7 +1630,7 @@ error_bug:
error_exit:
ser_error=E_BAD_URI;
uri->type=ERROR_URI_T;
- update_stat(bad_URIs, 1);
+ //update_stat(bad_URIs, 1);
return E_BAD_URI;
}