Add a test case for bug oss-fuzz:10389. Add the invalid-oss-fuzz-10389.ivf test case to invalid_file_test.cc. invalid-oss-fuzz-10389.ivf is constructed from the reproducer test case for bug oss-fuzz:10705. The initial IVF frames in the reproducer test case are added to invalid-oss-fuzz-10389.ivf, until the first IVF frame that causes libaom to call generate_next_ref_frame_map(). That IVF frame is then repeated 16 times. Without the bug fix, we leak the references to one frame buffer each time we decode that IVF frame, so the 16th call to get_free_fb() will return INVALID_IDX (-1) with error AOM_CODEC_MEM_ERROR (2). Tested: ./test_libaom --gtest_filter=*InvalidFileTest* BUG=oss-fuzz:10389 Change-Id: I2cd9fc589979d4d7d1277f778eaccd64f1b2cd9d
diff --git a/test/invalid_file_test.cc b/test/invalid_file_test.cc index 9fcf8f8..fba9cc2 100644 --- a/test/invalid_file_test.cc +++ b/test/invalid_file_test.cc
@@ -114,6 +114,7 @@ { 1, "invalid-oss-fuzz-10061.ivf" }, { 1, "invalid-oss-fuzz-10117-mc-buf-use-highbd.ivf" }, { 1, "invalid-oss-fuzz-10227.ivf" }, + { 1, "invalid-oss-fuzz-10389.ivf" }, { 4, "invalid-oss-fuzz-10555.ivf" }, { 1, "invalid-oss-fuzz-10705.ivf" }, { 1, "invalid-oss-fuzz-10723.ivf" },
diff --git a/test/test-data.sha1 b/test/test-data.sha1 index 636d7c3..3cb36f7 100644 --- a/test/test-data.sha1 +++ b/test/test-data.sha1
@@ -8,6 +8,8 @@ 88e18e61bd2b7457b4c71ebefbdff0029c41cc04 *invalid-oss-fuzz-10117-mc-buf-use-highbd.ivf.res 91a5bedeb4832c1c2900736cc0f644bb63971bbc *invalid-oss-fuzz-10227.ivf b055f06b9a95aaa5697fa26497b592a47843a7c8 *invalid-oss-fuzz-10227.ivf.res +38729f95909e1a3dbe1c38ebd2860862e2f0536f *invalid-oss-fuzz-10389.ivf +2318c583a419d843e38660732c21c25b4281b25e *invalid-oss-fuzz-10389.ivf.res 11df8e9a068669c678097d460b63609d3da73828 *invalid-oss-fuzz-10555.ivf b055f06b9a95aaa5697fa26497b592a47843a7c8 *invalid-oss-fuzz-10555.ivf.res 03b6fd16abe30d56a3dd09f5280a6450a1b83a78 *invalid-oss-fuzz-10705.ivf
diff --git a/test/test_data_util.cmake b/test/test_data_util.cmake index 5d29b1a..8118316 100644 --- a/test/test_data_util.cmake +++ b/test/test_data_util.cmake
@@ -508,6 +508,8 @@ "invalid-oss-fuzz-10117-mc-buf-use-highbd.ivf.res" "invalid-oss-fuzz-10227.ivf" "invalid-oss-fuzz-10227.ivf.res" + "invalid-oss-fuzz-10389.ivf" + "invalid-oss-fuzz-10389.ivf.res" "invalid-oss-fuzz-10555.ivf" "invalid-oss-fuzz-10555.ivf.res" "invalid-oss-fuzz-10705.ivf"