aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay Ragir <akshay.ragir@ittiam.com>2023-11-15 14:04:10 +0530
committerDivya B M <89966460+divya-bm@users.noreply.github.com>2023-11-16 09:24:49 +0530
commit695799b8b696425a0c1afbc829a4b8da3bdd315e (patch)
tree3154e76e7ea85ae36589f22b878949a7af2d32a0
parent10a262f43c6e7113e1f67a2a034c4ff2e1d3f01a (diff)
downloadlibxaac-695799b8b696425a0c1afbc829a4b8da3bdd315e.tar.gz
Fix for the Null-dereference READ in ixheaace_write_bits
This change handles the error reported while processing individual bitstream element in case of multi-channel streams. Bug: ossFuzz: 64022 Test: poc in bug
-rw-r--r--encoder/ixheaace_api.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/encoder/ixheaace_api.c b/encoder/ixheaace_api.c
index 4bc7ddd..fee5c9e 100644
--- a/encoder/ixheaace_api.c
+++ b/encoder/ixheaace_api.c
@@ -3601,6 +3601,9 @@ IA_ERRORCODE ixheaace_process(pVOID pstr_obj_ixheaace, pVOID pv_input, pVOID pv_
if (!pstr_api_struct->usac_en) {
for (ele_idx = 0; ele_idx < pstr_api_struct->config[0].num_bs_elements; ele_idx++) {
error = ia_enhaacplus_enc_execute(pstr_api_struct, ele_idx);
+ if (error != IA_NO_ERROR) {
+ return error;
+ }
}
if ((error == IA_NO_ERROR) && (pstr_api_struct->pstr_state->is_quant_spec_zero)) {
error = IA_EXHEAACE_EXE_NONFATAL_QUANTIZATION_SPECTRUM_ZERO;