diff options
author | Rajat Kumar <rajat.kumar@ittiam.com> | 2018-12-27 19:27:17 +0530 |
---|---|---|
committer | Ray Essick <essick@google.com> | 2019-01-11 14:16:39 -0800 |
commit | eb58cff8321e8c8c9f3059d298829ad4b0ef863f (patch) | |
tree | c9d6161c898ca64c0a08d683076880d790d5c1bd /decoder/ixheaacd_esbr_envcal.c | |
parent | cdce0be0991e636ffd7ad15171d1cd46493206d4 (diff) | |
download | libxaac-eb58cff8321e8c8c9f3059d298829ad4b0ef863f.tar.gz |
Fix for array bound overflows
Added bound checks and handled the respective returned
error across source and header files.
Bug:120452956
Test: vendor, poc
Change-Id: I5a9ebf68e7a5d2f41a0112aff113f0b1b8eeba7c
Diffstat (limited to 'decoder/ixheaacd_esbr_envcal.c')
-rw-r--r-- | decoder/ixheaacd_esbr_envcal.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/decoder/ixheaacd_esbr_envcal.c b/decoder/ixheaacd_esbr_envcal.c index e1bb1c7..a3382c3 100644 --- a/decoder/ixheaacd_esbr_envcal.c +++ b/decoder/ixheaacd_esbr_envcal.c @@ -22,7 +22,7 @@ #include <string.h> #include <ixheaacd_type_def.h> - +#include "ixheaacd_error_standards.h" #include "ixheaacd_sbr_const.h" #include "ixheaacd_sbrdecsettings.h" #include "ixheaacd_bitbuffer.h" @@ -569,6 +569,8 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data, } for (i = 0; i < bs_num_env; i++) { + if (kk > MAX_NOISE_ENVELOPES) return IA_FATAL_ERROR; + if (p_frame_info->border_vec[i] == p_frame_info->noise_border_vec[kk]) kk++, next++; |