summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaveen Kumar P <naveenkumar.p@ittiam.com>2017-10-04 09:55:14 +0530
committerMSe <mse1969@posteo.de>2018-01-10 18:15:43 +0100
commit6600fe800cd46d043a2cabaffcf3a8154e39465e (patch)
treed795a702999f32b746dd5b9b015221f47010833d
parentf3e1cf31fe4a5ce63783883671360fccc0dfc90f (diff)
downloadframeworks_av-6600fe800cd46d043a2cabaffcf3a8154e39465e.tar.gz
frameworks_av-6600fe800cd46d043a2cabaffcf3a8154e39465e.tar.bz2
frameworks_av-6600fe800cd46d043a2cabaffcf3a8154e39465e.zip
Access HEVC context after create fail check
Bug: 66969193 Change-Id: Icd1c8d78986e3795ba7f1c1d50ebeb90d77f6178 (cherry picked from commit 2bee8317ecfa5dca3c43d99db40491c4e28f832d) CVE-2017-13179
-rw-r--r--media/libstagefright/codecs/hevcdec/SoftHEVC.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/media/libstagefright/codecs/hevcdec/SoftHEVC.cpp b/media/libstagefright/codecs/hevcdec/SoftHEVC.cpp
index 1dac86804b..98fafbc9c3 100644
--- a/media/libstagefright/codecs/hevcdec/SoftHEVC.cpp
+++ b/media/libstagefright/codecs/hevcdec/SoftHEVC.cpp
@@ -278,10 +278,6 @@ status_t SoftHEVC::initDecoder() {
status = ivdec_api_function(mCodecCtx, (void *)&s_create_ip, (void *)&s_create_op);
- mCodecCtx = (iv_obj_t*)s_create_op.s_ivd_create_op_t.pv_handle;
- mCodecCtx->pv_fxns = dec_fxns;
- mCodecCtx->u4_size = sizeof(iv_obj_t);
-
if (status != IV_SUCCESS) {
ALOGE("Error in create: 0x%x",
s_create_op.s_ivd_create_op_t.u4_error_code);
@@ -289,6 +285,10 @@ status_t SoftHEVC::initDecoder() {
mCodecCtx = NULL;
return UNKNOWN_ERROR;
}
+
+ mCodecCtx = (iv_obj_t*)s_create_op.s_ivd_create_op_t.pv_handle;
+ mCodecCtx->pv_fxns = dec_fxns;
+ mCodecCtx->u4_size = sizeof(iv_obj_t);
}
/* Reset the plugin state */