[RESTRICT AUTOMERGE] CTS test for Android Security b/63122634

Bug: 63122634
Bug: 72323086
Test: Ran the new testcase on android-8.0.0_r30 with/without patch

Change-Id: I99b4250ae89665bca69fe261324053377c555384
Merged-In: I99b4250ae89665bca69fe261324053377c555384
(cherry picked from commit 0c4a77b7920d5f5097c4a26bb4d59782d1f6c4e0)
diff --git a/hostsidetests/securitybulletin/AndroidTest.xml b/hostsidetests/securitybulletin/AndroidTest.xml
index ed09f45..ae5b27a 100644
--- a/hostsidetests/securitybulletin/AndroidTest.xml
+++ b/hostsidetests/securitybulletin/AndroidTest.xml
@@ -302,6 +302,7 @@
         <option name="push" value="CVE-2017-1319032->/data/local/tmp/CVE-2017-13190" />
 
         <!-- Please add 64-bit binary tests below to avoid merge conflict -->
+        <option name="push" value="CVE-2017-1320364->/data/local/tmp/CVE-2017-13203" />
 
 
         <option name="append-bitness" value="false" />
diff --git a/hostsidetests/securitybulletin/res/cve_2017_13203.h264 b/hostsidetests/securitybulletin/res/cve_2017_13203.h264
new file mode 100644
index 0000000..2dbf4ff
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2017_13203.h264
Binary files differ
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-13203/Android.mk b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13203/Android.mk
new file mode 100644
index 0000000..6e7dda2
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13203/Android.mk
@@ -0,0 +1,34 @@
+# Copyright (C) 2020 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := CVE-2017-13203
+LOCAL_SRC_FILES := ../../../../../external/libavc/test/decoder/main.c
+LOCAL_SRC_FILES += ../includes/memutils.c
+LOCAL_MULTILIB := 64
+LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
+LOCAL_C_INCLUDES := external/libavc/common
+LOCAL_C_INCLUDES += external/libavc/decoder
+LOCAL_SHARED_LIBRARIES := libstagefright_soft_avcdec
+
+# Tag this module as a cts test artifact
+LOCAL_COMPATIBILITY_SUITE := cts sts vts
+LOCAL_CTS_TEST_PACKAGE := android.security.cts
+
+LOCAL_ARM_MODE := arm
+LOCAL_CFLAGS += -Wall -Werror -DCHECK_OVERFLOW
+LOCAL_CFLAGS += -DPROFILE_ENABLE -fPIC -DMD5_DISABLE
+include $(BUILD_CTS_EXECUTABLE)
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/TestMediaCodec.java b/hostsidetests/securitybulletin/src/android/security/cts/TestMediaCodec.java
index 0a69df6..e300d9f 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/TestMediaCodec.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/TestMediaCodec.java
@@ -140,6 +140,18 @@
      ******************************************************************************/
 
     /**
+     * b/63122634
+     */
+    @Test
+    @SecurityTest(minPatchLevel = "2018-01")
+    public void testPocCVE_2017_13203() throws Exception {
+        String inputFiles[] = {"cve_2017_13203.h264"};
+        AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2017-13203",
+               "--num_frames -1 -i " + AdbUtils.TMP_PATH + inputFiles[0], inputFiles,
+               AdbUtils.TMP_PATH, getDevice());
+    }
+
+    /**
      * b/33621215
      **/
     @Test