Commit 3dc11469 authored by vaclav's avatar vaclav
Browse files

Merge branch...

Merge branch 'float-1525-format-switching-reading-of-uninitialized-memory-in-ivas_dec_readformat' into 'main'

Fix reading of uninitialized memory in format switching

See merge request !2878
parents df7d10dc 785927d4
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -2962,6 +2962,10 @@ static ivas_error decodeVoIP(

            *phIvasDec = hIvasDec; /* Update for main()' s free */
            ivasRtp.restartNeeded = false;
#ifdef FIX_1525_UNINIT_FORMAT_SWITCHING_DEC
            bitstreamReadDone = false;
            parametersAvailableForEditing = false;
#endif
        }

        /* reference vector */
@@ -3211,6 +3215,10 @@ static ivas_error decodeVoIP(
                    }

                    *phIvasDec = hIvasDec; /* Update for main()' s free */
#ifdef FIX_1525_UNINIT_FORMAT_SWITCHING_DEC
                    bitstreamReadDone = false;
                    parametersAvailableForEditing = false;
#endif
                }

                /* Placeholder for memory reallocation */
@@ -3974,12 +3982,13 @@ static ivas_error restartDecoder(
        }
    }

#ifndef FIX_1525_UNINIT_FORMAT_SWITCHING_DEC
    if ( ( error = IVAS_DEC_PrintConfig( hIvasDec, 1, arg->voipMode ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
        goto cleanup;
    }

#endif
    /* ISAR frame size is set from command line, not renderer config file.
     * This will be ignored if output format is not split rendering. */
    if ( renderConfig != NULL )
+2 −1
Original line number Diff line number Diff line
@@ -99,8 +99,9 @@
#define FIX_BASOP_2470_POWER_SPEC_E_INIT                /* FhG: make sure powerSpec_e is always initialized in core_signal_analysis_high_bitrate_fx() */
#define FIX_BASOP_2475_ASSERT_IN_MASA2_REND_TO_MONO     /* Nokia: basop issue 2475: Fix MASA2 to MONO rendering within IVAS_rend */
#define FIX_2346_DUPLICATED_IGF_FUNCTIONS               /* FhG: basop issue 2346: Review potentially duplicated IGF functions */

#define FIX_1525_UNINIT_FORMAT_SWITCHING_DEC            /* VA: float issue 1525: fix reading of uninitialized memory in format switching at the decoder */
#define HARMONIZE_2446_CON_TCX_FX                       /* FhG: basop issue: 2446 harmonization of function con_tcx_fx() */

/* #################### End BE switches ################################## */

/* #################### Start NON-BE switches ############################ */