From e3a16054e4ad773921ba11efafca4c4a9763a8cc Mon Sep 17 00:00:00 2001 From: chengyj1985 Date: Wed, 22 Jul 2020 19:40:51 +0800 Subject: [PATCH] Buffer 'VideoCodecTypeString' can overflow when index>28 Change-Id: Ifb8f0f6f468e3d66cb49391a9e883812c385a4e3 --- packaging/libmm-fileinfo.spec | 3 +++ tests/mm_file_test.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/packaging/libmm-fileinfo.spec b/packaging/libmm-fileinfo.spec index 2c98c1e..c4a5a7c 100644 --- a/packaging/libmm-fileinfo.spec +++ b/packaging/libmm-fileinfo.spec @@ -47,6 +47,9 @@ Multimedia Framework FileInfo Library (development files) cp %{SOURCE1001} . %build +%if "%{tizen_profile_name}" == "tv" +export CFLAGS+=" -DUSE_CODEC_VPX" +%endif export CFLAGS+=" -Wextra -Wno-array-bounds" export CFLAGS+=" -Wno-ignored-qualifiers -Wno-unused-parameter -Wshadow" export CFLAGS+=" -Wwrite-strings -Wswitch-default -Werror" diff --git a/tests/mm_file_test.c b/tests/mm_file_test.c index 0ce5490..94fdfd8 100755 --- a/tests/mm_file_test.c +++ b/tests/mm_file_test.c @@ -169,6 +169,9 @@ const char *VideoCodecTypeString[] = { "MPEG4 part-2 Advanced Simple profile", "MPEG4 part-2 Main profile", "MPEG4 part-2 Core profile", "MPEG4 part-2 Adv Coding Eff profile", "MPEG4 part-2 Adv RealTime Simple profile", /* 16~20 */ "MPEG4 part-10 (h.264)", "Real", "VC-1", "AVS", "Cinepak", /* 21~25 */ "Indeo", "Theora", "Flv" /* 26~28 */ +#ifdef USE_CODEC_VPX + ,"VP8", "VP9" /*29~30*/ +#endif }; -- 2.7.4