CTS/STS test for Android Security b/36724453

Bug:36724453
Change-Id: I63894109ef876fae9fa7ebbe9386bdaa66f8b93c
diff --git a/tests/tests/security/res/raw/cve_2017_0691.bmp b/tests/tests/security/res/raw/cve_2017_0691.bmp
new file mode 100644
index 0000000..d3f7c6d
--- /dev/null
+++ b/tests/tests/security/res/raw/cve_2017_0691.bmp
Binary files differ
diff --git a/tests/tests/security/src/android/security/cts/BitmapFactoryDecodeStreamTest.java b/tests/tests/security/src/android/security/cts/BitmapFactoryDecodeStreamTest.java
index 83aa615..f36229e7 100644
--- a/tests/tests/security/src/android/security/cts/BitmapFactoryDecodeStreamTest.java
+++ b/tests/tests/security/src/android/security/cts/BitmapFactoryDecodeStreamTest.java
@@ -39,4 +39,11 @@
         BitmapFactory.decodeStream(inStream);
 
     }
+
+    @SecurityTest
+    public void testPocCVE_2017_0691() throws Exception {
+        InputStream exploitImage = new BufferedInputStream(mContext.getResources().openRawResource(
+                R.raw.cve_2017_0691));
+        BitmapFactory.decodeStream(exploitImage);
+    }
 }