commit | 97a35c180686ef6e04839c955e60243135887315 | [log] [tgz] |
---|---|---|
author | Leon Scroggins III <scroggo@google.com> | Tue May 12 17:04:40 2020 -0400 |
committer | Leon Scroggins III <scroggo@google.com> | Tue May 12 17:04:40 2020 -0400 |
tree | 37cc657200a24dcf66ebceb7822ba3372f9db160 | |
parent | 230fdf5b912e937b25caeea1262db0d21da70386 [diff] |
Add a test for DNG fix Bug: 156261521 Test: This Change-Id: If0722deb96def186fcd0a2d97e57647a1b5987f8
diff --git a/tests/tests/security/res/raw/bug_156261521.dng b/tests/tests/security/res/raw/bug_156261521.dng new file mode 100644 index 0000000..b838844 --- /dev/null +++ b/tests/tests/security/res/raw/bug_156261521.dng Binary files differ
diff --git a/tests/tests/security/src/android/security/cts/BitmapFactorySecurityTests.java b/tests/tests/security/src/android/security/cts/BitmapFactorySecurityTests.java index 8ffe485..f463855 100644 --- a/tests/tests/security/src/android/security/cts/BitmapFactorySecurityTests.java +++ b/tests/tests/security/src/android/security/cts/BitmapFactorySecurityTests.java
@@ -83,4 +83,11 @@ fail("OOM attempting to decode BMP"); } } + + @SecurityTest + public void test_android_bug_156261521() { + // Previously decoding this would crash. + FileDescriptor exploitImage = getResource(R.raw.bug_156261521); + BitmapFactory.decodeFileDescriptor(exploitImage); + } }