diff options
author | Akshata Jadhav <akshata.jadhav@ittiam.com> | 2018-02-21 11:39:52 +0530 |
---|---|---|
committer | MSe <mse1969@posteo.de> | 2018-06-08 10:22:13 +0200 |
commit | 054e630a3a837bf048a48fce275c0b3a0b6dde10 (patch) | |
tree | 780f5ec08b9dc4afeb8d464860cc0d4204b90d3e | |
parent | ba9c0a75e41b1f7bfc7f08dbb29d346c4467d9d6 (diff) | |
download | android_external_libavc-054e630a3a837bf048a48fce275c0b3a0b6dde10.tar.gz android_external_libavc-054e630a3a837bf048a48fce275c0b3a0b6dde10.tar.bz2 android_external_libavc-054e630a3a837bf048a48fce275c0b3a0b6dde10.zip |
Encoder: Return error for odd resolution
Bug: 73625898
Test: ran POC before/after under ASAN
Change-Id: I9765b57f4afc6a2b6ad9cd19c8c7c5000beb9de9
(cherry picked from commit 9fa58d4db3ef176ed54af5f602970b48624be413)
CVE-2018-9351
-rw-r--r-- | encoder/ih264e_api.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/encoder/ih264e_api.c b/encoder/ih264e_api.c index e0c9f83..4091fc2 100644 --- a/encoder/ih264e_api.c +++ b/encoder/ih264e_api.c @@ -1147,6 +1147,24 @@ static IV_STATUS_T api_check_struct_sanity(iv_obj_t *ps_handle, return (IV_FAIL); } + if(ps_ip->s_ive_ip.u4_wd & 1) + { + ps_op->s_ive_op.u4_error_code |= 1 + << IVE_UNSUPPORTEDPARAM; + ps_op->s_ive_op.u4_error_code |= + IH264E_WIDTH_NOT_SUPPORTED; + return (IV_FAIL); + } + + if(ps_ip->s_ive_ip.u4_ht & 1) + { + ps_op->s_ive_op.u4_error_code |= 1 + << IVE_UNSUPPORTEDPARAM; + ps_op->s_ive_op.u4_error_code |= + IH264E_HEIGHT_NOT_SUPPORTED; + return (IV_FAIL); + } + break; } |