diff options
author | Akshay Ragir <akshay.ragir@ittiam.com> | 2023-09-08 16:25:11 +0530 |
---|---|---|
committer | Divya B M <89966460+divya-bm@users.noreply.github.com> | 2023-09-09 20:32:12 +0530 |
commit | f39922ae991f3fdd66da1e02d2fdebe6619ae28e (patch) | |
tree | f4baca7e1253be250b641340a6f4e702dcb0fded /test | |
parent | 62c8372f6b2506bf96f962f09497f88491d0d96e (diff) | |
download | libxaac-f39922ae991f3fdd66da1e02d2fdebe6619ae28e.tar.gz |
Fix for the Global-buffer-overflow READ 4 in iaace_quantize_lines
These changes handle the runtime error reported when the gain
value exceeds the maximum supported value because of zero
spectrum. This is resolved by exiting the rate distortion loop
when zero spectrum is detected. The issue is reported with AAC
and the same changes are extended to USAC.
Bug: ossFuzz:61699
Test: poc in bug
Diffstat (limited to 'test')
-rw-r--r-- | test/encoder/ixheaace_error.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/encoder/ixheaace_error.c b/test/encoder/ixheaace_error.c index 3861665..63204fe 100644 --- a/test/encoder/ixheaace_error.c +++ b/test/encoder/ixheaace_error.c @@ -115,10 +115,15 @@ pWORD8 ppb_ia_enhaacplus_enc_sbr_init_fatal[IA_MAX_ERROR_SUB_CODE] = { /* Class 2: Execution Errors *****************************************************************************/ /* Non Fatal Errors */ +pWORD8 ppb_ia_enhaacplus_enc_aac_exe_non_fatal[IA_MAX_ERROR_SUB_CODE] = { + (pWORD8) "Quantization zero spectrum detected"}; pWORD8 ppb_ia_enhaacplus_enc_mps_exe_non_fatal[IA_MAX_ERROR_SUB_CODE] = { (pWORD8) "Encoding Failed", (pWORD8) "Invalid MPS data bands"}; +pWORD8 ppb_ia_enhaacplus_enc_usac_exe_non_fatal[IA_MAX_ERROR_SUB_CODE] = { + (pWORD8) "Quantization zero spectrum detected"}; + pWORD8 ppb_ia_enhaacplus_enc_esbr_exe_non_fatal[IA_MAX_ERROR_SUB_CODE] = { (pWORD8) "Invalid bandwidth index encountered", (pWORD8) "Invalid number of patches", @@ -251,6 +256,10 @@ VOID ia_enhaacplus_enc_error_handler_init() { ppb_ia_enhaacplus_enc_mps_exe_fatal; ia_enhaacplus_enc_error_info.ppppb_error_msg_pointers[1][3][2] = ppb_ia_enhaacplus_enc_usac_exe_fatal; + ia_enhaacplus_enc_error_info.ppppb_error_msg_pointers[0][3][0] = + ppb_ia_enhaacplus_enc_aac_exe_non_fatal; + ia_enhaacplus_enc_error_info.ppppb_error_msg_pointers[0][3][2] = + ppb_ia_enhaacplus_enc_usac_exe_non_fatal; } IA_ERRORCODE ia_error_handler(ia_error_info_struct *p_mod_err_info, WORD8 *pb_context, |