summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarish Mahendrakar <harish.mahendrakar@ittiam.com>2017-04-22 11:52:48 +0530
committerMSe <mse1969@posteo.de>2017-07-06 23:33:28 +0200
commitd87a66d278072751941571867ef1674c274e88d8 (patch)
treea6e7355bff98737e15c23fb570be9fd8285c251d
parent3dae167cf737f414975c78de50c5667a2bbf8f4d (diff)
downloadandroid_external_libhevc-d87a66d278072751941571867ef1674c274e88d8.tar.gz
android_external_libhevc-d87a66d278072751941571867ef1674c274e88d8.tar.bz2
android_external_libhevc-d87a66d278072751941571867ef1674c274e88d8.zip
memset SPS to zero
SPS structure is memset to zero in parse_sps() Bug: 33966031 Bug: 37458993 AOSP-Change-Id: I7d4c04d2d25d7e9c8f581bd470260fc4394a564b (cherry picked from commit 2e0e75aedef322baeb829bf5151aba312840ed40) CVE-2017-0540 Change-Id: I6f3f6a16b3b985124459133683dcd7ce29af76de
-rw-r--r--decoder/ihevcd_parse_headers.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/decoder/ihevcd_parse_headers.c b/decoder/ihevcd_parse_headers.c
index 4c38b0a..0f98094 100644
--- a/decoder/ihevcd_parse_headers.c
+++ b/decoder/ihevcd_parse_headers.c
@@ -1222,6 +1222,12 @@ IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec)
ps_sps = (ps_codec->s_parse.ps_sps_base + MAX_SPS_CNT - 1);
+ /* Reset SPS to zero */
+ {
+ WORD16 *pi2_scaling_mat = ps_sps->pi2_scaling_mat;
+ memset(ps_sps, 0, sizeof(sps_t));
+ ps_sps->pi2_scaling_mat = pi2_scaling_mat;
+ }
ps_sps->i1_sps_id = sps_id;
ps_sps->i1_vps_id = vps_id;
ps_sps->i1_sps_max_sub_layers = sps_max_sub_layers;