commit | 270e6734331112d65e43c8aa43e068fff5506a15 | [log] [tgz] |
---|---|---|
author | Leon Scroggins III <scroggo@google.com> | Tue May 12 17:04:40 2020 -0400 |
committer | android-build-team Robot <android-build-team-robot@google.com> | Thu May 21 08:46:10 2020 +0000 |
tree | 576bd6f204fe7ed35148c85b69fa98ad199b0420 | |
parent | 6daeb298427201c814b044d96b99b0aa71a1c9db [diff] |
Add a test for DNG fix Bug: 156261521 Test: This Change-Id: If0722deb96def186fcd0a2d97e57647a1b5987f8 Merged-In: If0722deb96def186fcd0a2d97e57647a1b5987f8 (cherry picked from commit 527034deb155019b775336cc6ea3838ec89e14df)
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); + } }