From 26a9da724f4f6f14f3a863a56434b9e6ac360afa Mon Sep 17 00:00:00 2001 From: Ivan Lozano Date: Tue, 11 Dec 2018 09:14:39 -0800 Subject: [PATCH] Enable bounds sanitization in libaac. Enables the UBSan bounds sanitizer in libaac. This adds bounds checks around array accesses when the array size is known at compile time. Bug: 117221610 Test: make -j Test: Device boots. Change-Id: Ib820c7ec6ef6bcbf98d8526ed213c90ab29169c2 --- Android.bp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Android.bp b/Android.bp index b322d07..73957f6 100644 --- a/Android.bp +++ b/Android.bp @@ -25,7 +25,11 @@ cc_library_static { "-Wno-implicit-fallthrough", ], sanitize: { - misc_undefined:["unsigned-integer-overflow", "signed-integer-overflow"], + misc_undefined:[ + "unsigned-integer-overflow", + "signed-integer-overflow", + "bounds", + ], cfi: true, }, export_include_dirs: [