Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a68fd19 authored by Ramesh Katuri's avatar Ramesh Katuri Committed by Ray Essick
Browse files

DO NOT MERGE SoftXAAC::initXAACDecoder does not validate n_mems vs mMallocCount

Removing dependency of n_mems

Bug: 78782013
Test: build/boot
Change-Id: I4c47c7deee5dbff9f6985340ea89b9b7ca4c9666
parent 234b6925
Loading
Loading
Loading
Loading
+6 −13
Original line number Diff line number Diff line
@@ -918,7 +918,6 @@ int SoftXAAC::initXAACDecoder() {
    /* Get memory information and allocate memory        */

    /* Memory variables */
    UWORD32 n_mems, ui_rem;
    UWORD32 ui_proc_mem_tabs_size;
    /* API size */
    UWORD32 pui_ap_isize;
@@ -999,15 +998,9 @@ int SoftXAAC::initXAACDecoder() {
    /* ******************************************************************/
    /* Allocate Memory with info from library                           */
    /* ******************************************************************/

    /* Get number of memory tables required */
    err_code = ixheaacd_dec_api(mXheaacCodecHandle,
                                IA_API_CMD_GET_N_MEMTABS,
                                0,
                                &n_mems);
    ALOGV("return code of IA_API_CMD_GET_N_MEMTABS: %d",err_code);

    for(i = 0; i < (WORD32)n_mems; i++) {
    /* There are four different types of memories, that needs to be allocated */
    /* persistent,scratch,input and output */
    for(i = 0; i < 4; i++) {
        int ui_size = 0, ui_alignment = 0, ui_type = 0;
        pVOID pv_alloc_ptr;