diff options
author | Naveen Kumar P <naveenkumar.p@ittiam.com> | 2017-10-04 10:10:39 +0530 |
---|---|---|
committer | MSe <mse1969@posteo.de> | 2018-01-10 18:12:43 +0100 |
commit | f3e1cf31fe4a5ce63783883671360fccc0dfc90f (patch) | |
tree | 6f35409773160049f299bc974ffe22ce4256a2e1 | |
parent | 3f7ccca648e855bd4decc6f8272559717f3d1295 (diff) | |
download | frameworks_av-f3e1cf31fe4a5ce63783883671360fccc0dfc90f.tar.gz frameworks_av-f3e1cf31fe4a5ce63783883671360fccc0dfc90f.tar.bz2 frameworks_av-f3e1cf31fe4a5ce63783883671360fccc0dfc90f.zip |
Access AVCDEC context after create fail check
Bug: 66969281
Change-Id: I7c293417079da991cfad675a2d5563423d751610
(cherry picked from commit 8e6a6fe2e1542b3333ffecb7307a5de671c8a785)
CVE-2017-13178
-rw-r--r-- | media/libstagefright/codecs/avcdec/SoftAVCDec.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/media/libstagefright/codecs/avcdec/SoftAVCDec.cpp b/media/libstagefright/codecs/avcdec/SoftAVCDec.cpp index 2130ccf856..c43f9da4c9 100644 --- a/media/libstagefright/codecs/avcdec/SoftAVCDec.cpp +++ b/media/libstagefright/codecs/avcdec/SoftAVCDec.cpp @@ -317,10 +317,6 @@ status_t SoftAVC::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); @@ -328,6 +324,10 @@ status_t SoftAVC::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 */ |