aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Lozano <ivanlozano@google.com>2018-07-10 12:43:32 -0700
committerIvan Lozano <ivanlozano@google.com>2018-07-13 15:21:22 -0700
commit86485d9cbaea0ac18ae770ceb29a344db9dc625a (patch)
tree8b4a0da1776224f37b38c37e59a8b558d768d4f0
parentcf168b63a5c4766bcb663d9ddb16dadbc080e103 (diff)
downloadlibopus-86485d9cbaea0ac18ae770ceb29a344db9dc625a.tar.gz
Enable integer overflow sanitization in libopus.
Enable integer overflow sanitization in libopus, initially in diagnostics mode. Bug: 110791537 Test: CTS tests Change-Id: I15d13107b1705cb6c67ef870f8754515c6306142
-rw-r--r--Android.bp8
-rw-r--r--libopus_blacklist.txt20
2 files changed, 28 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index 82f6a7ca..b66450b9 100644
--- a/Android.bp
+++ b/Android.bp
@@ -14,6 +14,14 @@ cc_library_shared {
"silk/fixed",
],
+ sanitize: {
+ integer_overflow: true,
+ diag: {
+ integer_overflow: true,
+ },
+ blacklist: "libopus_blacklist.txt",
+ },
+
srcs: [
// CELT_SOURCES
"celt/bands.c",
diff --git a/libopus_blacklist.txt b/libopus_blacklist.txt
new file mode 100644
index 00000000..39ab0f95
--- /dev/null
+++ b/libopus_blacklist.txt
@@ -0,0 +1,20 @@
+[integer]
+fun:celt_lcg_rand
+# celt/entcode.h:131: negation of 100 cannot be represented in type 'opus_uint32'
+fun:celt_udiv
+# celt/mdct.c:273
+# celt/mdct.c:274
+# celt/mdct.c:304
+# celt/mdct.c:305
+# celt/mdct.c:315
+# celt/mdct.c:316
+# celt/mdct.c:336
+# celt/mdct.c:337
+fun:clt_mdct_backward_c
+fun:ec_dec_init
+# celt/entdec.c:143
+fun:ec_decode
+# celt/entdec.c:150
+fun:ec_decode_bin
+
+src:*/celt/kiss_fft.c