aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarish Mahendrakar <harish.mahendrakar@ittiam.com>2019-07-18 14:44:16 -0700
committerRay Essick <essick@google.com>2020-02-12 17:18:48 +0000
commitfa84ffd2c71b0a4cf2557ada25a38e09cb14f051 (patch)
treeb0e728be8212449521dddbb0c50c7391b0a3a099
parent75d1ac1026539f82a299ef6cea2b59150098ddbb (diff)
downloadlibhevc-fa84ffd2c71b0a4cf2557ada25a38e09cb14f051.tar.gz
common: Fix unintialized reads in intra pred sse functions
Bug: 144686961 Bug: 137565646 Bug: 137228292 Test: poc in bug Change-Id: I2830a30230cf566b17dca77a68136c9c4bd82215 (cherry picked from commit 406fb2aa0e31a365ad10c2ef32df365211fa4687)
-rw-r--r--common/x86/ihevc_intra_pred_filters_sse42_intr.c4
-rw-r--r--decoder/ihevcd_iquant_itrans_recon_ctb.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/common/x86/ihevc_intra_pred_filters_sse42_intr.c b/common/x86/ihevc_intra_pred_filters_sse42_intr.c
index 6488de6..e72f042 100644
--- a/common/x86/ihevc_intra_pred_filters_sse42_intr.c
+++ b/common/x86/ihevc_intra_pred_filters_sse42_intr.c
@@ -1969,7 +1969,7 @@ void ihevc_intra_pred_luma_mode_11_to_17_sse42(UWORD8 *pu1_ref,
__m128i row_4x32b, two_nt_4x32b, ref_main_idx_4x32b, res_temp5_4x32b, sm3;
- UWORD8 ref_tmp[2 * MAX_CU_SIZE + 2];
+ UWORD8 ref_tmp[2 * MAX_CU_SIZE + 2] = {0};
UWORD8 *ref_main;
UWORD8 *ref_temp;
UNUSED(src_strd);
@@ -2799,7 +2799,7 @@ void ihevc_intra_pred_luma_mode_19_to_25_sse42(UWORD8 *pu1_ref,
WORD32 inv_ang, inv_ang_sum;
//WORD32 ref_main_idx, pos, fract, idx;
WORD32 ref_idx;
- UWORD8 ref_tmp[(2 * MAX_CU_SIZE) + 2];
+ UWORD8 ref_tmp[(2 * MAX_CU_SIZE) + 2] = {0};
UWORD8 *ref_main, *ref_temp;
__m128i /*fract_8x16b,*/ const_temp_8x16b, sm3;
diff --git a/decoder/ihevcd_iquant_itrans_recon_ctb.c b/decoder/ihevcd_iquant_itrans_recon_ctb.c
index a7cd167..50f8dce 100644
--- a/decoder/ihevcd_iquant_itrans_recon_ctb.c
+++ b/decoder/ihevcd_iquant_itrans_recon_ctb.c
@@ -946,7 +946,7 @@ WORD32 ihevcd_iquant_itrans_recon_ctb(process_ctxt_t *ps_proc)
/* While (MAX_TU_SIZE * 2 * 2) + 1 is the actaul size needed,
au1_ref_sub_out size is kept as multiple of 8,
so that SIMD functions can load 64 bits */
- UWORD8 au1_ref_sub_out[(MAX_TU_SIZE * 2 * 2) + 8];
+ UWORD8 au1_ref_sub_out[(MAX_TU_SIZE * 2 * 2) + 8] = {0};
UWORD8 *pu1_top_left, *pu1_top, *pu1_left;
WORD32 luma_pred_func_idx, chroma_pred_func_idx;