Fixes ubsan tests with clang

Without the fix, ubsan would complain about some of the
NULL pointer checks from test_opus_api.
diff --git a/include/opus_defines.h b/include/opus_defines.h
index b1ead56..c033c7e 100644
--- a/include/opus_defines.h
+++ b/include/opus_defines.h
@@ -179,10 +179,20 @@
 
 /* Macros to trigger compilation errors when the wrong types are provided to a CTL */
 #define __opus_check_int(x) (((void)((x) == (opus_int32)0)), (opus_int32)(x))
+
+#ifdef DISABLE_PTR_CHECK
+/* Disable checks to prevent ubsan from complaining about NULL checks
+   in test_opus_api. */
+#define __opus_check_int_ptr(ptr) (ptr)
+#define __opus_check_uint_ptr(ptr) (ptr)
+#define __opus_check_uint8_ptr(ptr) (ptr)
+#define __opus_check_val16_ptr(ptr) (ptr)
+#else
 #define __opus_check_int_ptr(ptr) ((ptr) + ((ptr) - (opus_int32*)(ptr)))
 #define __opus_check_uint_ptr(ptr) ((ptr) + ((ptr) - (opus_uint32*)(ptr)))
 #define __opus_check_uint8_ptr(ptr) ((ptr) + ((ptr) - (opus_uint8*)(ptr)))
 #define __opus_check_val16_ptr(ptr) ((ptr) + ((ptr) - (opus_val16*)(ptr)))
+#endif
 /** @endcond */
 
 /** @defgroup opus_ctlvalues Pre-defined values for CTL interface
diff --git a/tests/random_config.sh b/tests/random_config.sh
index 6232a9c..cdcfcda 100755
--- a/tests/random_config.sh
+++ b/tests/random_config.sh
@@ -39,7 +39,7 @@
 
 footprint=`echo -e "\n-DSMALL_FOOTPRINT" | shuf -n1`
 std=`echo -e "\n-std=c90\n-std=c99\n-std=c11\n-std=c17" | shuf -n1`
-sanitize=`echo -e "\n-fsanitize=address -fno-sanitize-recover=all\n-fsanitize=undefined -fno-sanitize-recover=all -fsanitize-recover=signed-integer-overflow" | shuf -n1`
+sanitize=`echo -e "\n-fsanitize=address -fno-sanitize-recover=all\n-fsanitize=undefined -fno-sanitize-recover=all -fsanitize-recover=signed-integer-overflow -DDISABLE_PTR_CHECK" | shuf -n1`
 
 
 CFLAGS="$CFLAGS $std $opt $arch $footprint $math $sanitize"