diff options
author | Ray Essick <essick@google.com> | 2019-04-03 22:51:57 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-04-03 22:51:57 +0000 |
commit | ff1452f96fb3b746fd13d836f60dc95631d229b0 (patch) | |
tree | b2fce2033a7ee3cbca934ee36717a5ba1a01cf28 | |
parent | c99fe20ffc3580a7a7eeea191811931187cd6297 (diff) | |
parent | 7f66587c3b8c07a55e9a9e494e51b2de79500687 (diff) | |
download | libxaac-ff1452f96fb3b746fd13d836f60dc95631d229b0.tar.gz |
Merge "Fix for out of bound write in xaacdec test bench"
-rw-r--r-- | test/ixheaacd_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ixheaacd_main.c b/test/ixheaacd_main.c index 889d238..757c78a 100644 --- a/test/ixheaacd_main.c +++ b/test/ixheaacd_main.c @@ -1216,6 +1216,9 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) { ixheaacd_i_bytes_to_read = get_metadata_dec_exec(meta_info, frame_counter); + if (ixheaacd_i_bytes_to_read > (WORD32)ui_inp_size) + return IA_FATAL_ERROR; + if (ixheaacd_i_bytes_to_read <= 0) { err_code = (*p_ia_process_api)(pv_ia_process_api_obj, IA_API_CMD_INPUT_OVER, 0, NULL); @@ -1611,6 +1614,8 @@ int ixheaacd_main_process(WORD32 argc, pWORD8 argv[]) { ixheaacd_i_bytes_to_read = get_metadata_dec_exec(meta_info, frame_counter); + if (ixheaacd_i_bytes_to_read > (WORD32)ui_inp_size) return IA_FATAL_ERROR; + if (ixheaacd_i_bytes_to_read <= 0) { err_code = (*p_ia_process_api)(pv_ia_process_api_obj, IA_API_CMD_INPUT_OVER, 0, NULL); |