From 42db4d19acb658d6dcd059a319a378c89c3df75a Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 5 Jan 2022 17:15:42 -0800 Subject: Use LONG_MAX instead of __WORDSIZE to find size of long __WORDSIZE isn't guaranteed to have any relation to the size of long, compare LONG_MAX to INT64_MAX to find if int64_t* will be equivalent to long*. Bug: 190084016 Test: m USE_HOST_MUSL=true host-native Change-Id: Ie50e78b92c1c72c9eaedbdc8267b7e382c40e96b --- source/dng_safe_arithmetic.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/dng_safe_arithmetic.h b/source/dng_safe_arithmetic.h index b229dc4..66c5ebf 100644 --- a/source/dng_safe_arithmetic.h +++ b/source/dng_safe_arithmetic.h @@ -20,6 +20,7 @@ #ifndef __dng_safe_arithmetic__ #define __dng_safe_arithmetic__ +#include #include #include #include @@ -112,7 +113,7 @@ std::int64_t SafeInt64MultSlow(std::int64_t arg1, std::int64_t arg2); #if __has_builtin(__builtin_smull_overflow) inline std::int64_t SafeInt64MultByClang(std::int64_t arg1, std::int64_t arg2) { std::int64_t result; -#if (__WORDSIZE == 64) && !defined(__APPLE__) +#if LONG_MAX == INT64_MAX if (__builtin_smull_overflow(arg1, arg2, &result)) { #else if (__builtin_smulll_overflow(arg1, arg2, &result)) { -- cgit v1.2.3 From 4124aa3b43df86598e145b7fe907e5fc36cc86db Mon Sep 17 00:00:00 2001 From: Bob Badour Date: Mon, 7 Mar 2022 14:27:43 -0800 Subject: Add license_note Comments not preserved during refresh. Bug: 68860345 Test: m nothing Change-Id: I021395db83e2cdd4d152849c1f47c3d6758e288e --- METADATA | 1 + 1 file changed, 1 insertion(+) diff --git a/METADATA b/METADATA index 3814b8d..92c927f 100644 --- a/METADATA +++ b/METADATA @@ -2,5 +2,6 @@ # CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE # DEPENDING ON IT IN YOUR PROJECT. *** third_party { + license_note: "Adobe's DNG SDK License Agreement" license_type: BY_EXCEPTION_ONLY } -- cgit v1.2.3 From 81e38489d3badb76e37732c0661e7f3362883c97 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 8 Mar 2022 15:12:46 -0800 Subject: Tweak linux_glibc properties for musl builds in external/dng_sdk For convenience, builds against musl libc currently use the linux_glibc properties because they are almost always linux-specific and not glibc-specific. In preparation for removing this hack, tweak the linux_glibc properties by either moving them to host_linux, which will apply to linux_glibc, linux_musl and linux_bionic, or by setting appropriate musl or linux_musl properties. Properties that must not be repeated while musl uses linux_musl and also still uses the linux_glibc properties are moved to glibc properties, which don't apply to musl. Whether these stay as glibc properties or get moved back to linux_glibc later once the musl hack is removed is TBD. Bug: 223257095 Test: m checkbuild Test: m USE_HOST_MUSL=true host-native Change-Id: Ie70b17456bd4f20eddb0be44a56f6caa661e265e --- Android.bp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Android.bp b/Android.bp index 0681e93..3f2509e 100644 --- a/Android.bp +++ b/Android.bp @@ -156,7 +156,7 @@ cc_library{ ], target: { - linux_glibc: { + host_linux: { static_libs: ["libcompiler_rt-extras"], }, darwin: { -- cgit v1.2.3 From 893b4dc3d9fb5028c07e56ee33e7592d80ef334f Mon Sep 17 00:00:00 2001 From: Anis Assi Date: Tue, 8 Mar 2022 06:57:09 +0000 Subject: Adding android-security-assurance-redteam@google.com as fuzzer owner to receive alerts Bug: 221891733 Change-Id: Ic4cf1573d79925e2acbdd8241dab1207ff187627 --- fuzzer/Android.bp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fuzzer/Android.bp b/fuzzer/Android.bp index 26e2fa6..e3dcecf 100644 --- a/fuzzer/Android.bp +++ b/fuzzer/Android.bp @@ -36,4 +36,7 @@ cc_fuzz { "seeds/CVE_2020_9589/original.dng", "seeds/CVE_2020_9589/poc.dng", ], + fuzz_config: { + cc: ["android-security-assurance-redteam@google.com"], + }, } -- cgit v1.2.3 From 73bff36f7afeb6a349a44c83d7b13bf4faee4158 Mon Sep 17 00:00:00 2001 From: Alix Date: Mon, 18 Apr 2022 04:02:43 +0000 Subject: Deleted clang property in Android.bp files Deleted deprecated clang property in Android.bp files using bpmodify. Bug: 208980553 Test: treehugger Change-Id: I89b0dd731bacd7d110e0c59f717808120f4689ee --- Android.bp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Android.bp b/Android.bp index 3f2509e..f7933b3 100644 --- a/Android.bp +++ b/Android.bp @@ -133,7 +133,6 @@ cc_defaults { rtti: true, cppflags: ["-fexceptions"], - clang: true, sanitize: { misc_undefined: [ "unsigned-integer-overflow", @@ -142,7 +141,7 @@ cc_defaults { }, } -cc_library{ +cc_library { name: "libdng_sdk", host_supported: true, vendor_available: true, -- cgit v1.2.3