Commit 8c2c66c7 authored by norvell's avatar norvell
Browse files

Merge branch '1999-msan-use-of-uninitialized-value-in-renderconfigreader_checkvalues-2' into 'main'

Add FIX_1999_TEMPORARY_DISABLE_DIST_ATT_CHECK as temporary solution for issue 1999,

Closes #1999

See merge request !2231
parents dfe16351 feae840b
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@
#define NONBE_FIX_1220_OMASA_JBM_EXT_USAN               /* Nokia: fix issue 1220 OMASA EXT JBM USAN, also fix similar cases of free to avoid future problems */
#define NONBE_FIX_1376_MDCT_CONCEALMENT                 /* FhG: fix concealment artifact in MDCT Stereo with DTX, in case transition frame gets lost */
#define NONBE_1377_REND_DIRATT_CONF                     /* Eri: Issue 1377: Error in directivity attenuation configuration for both IVAS_dec and IVAS_rend */
#define FIX_1999_TEMPORARY_DISABLE_DIST_ATT_CHECK       /* Eri: Issue 1999: Range check on float values of distance attenuation, while the float values are not propagated to this function. The test is not correct, but configurable distance attenuation is not used in Characterization.*/
#define ADJUST_MCT_CHANNELS_MAX                         /* FhG: set correct max mct channels constant*/

/* #################### End BASOP porting switches ############################ */
+4 −0
Original line number Diff line number Diff line
@@ -1198,7 +1198,9 @@ ivas_error RenderConfigReader_checkValues(
    pRoom_acoustics = &hRenderConfig->roomAcoustics;
    tab_value_err_count = 0;
    int16_t wall_idx;
#ifndef FIX_1999_TEMPORARY_DISABLE_DIST_ATT_CHECK
    int16_t i;
#endif

    /* Verify the number of frequency bands in the config input data */
    if ( ( pRoom_acoustics->nBands > N_BANDS_MAX ) || ( pRoom_acoustics->nBands < N_BANDS_MIN ) )
@@ -1279,6 +1281,7 @@ ivas_error RenderConfigReader_checkValues(
                pRoom_acoustics->AbsCoeff_fx[wall_idx] = ER_MAX_ABS_COEFF_FX;
            }
        }
#ifndef FIX_1999_TEMPORARY_DISABLE_DIST_ATT_CHECK
        /* Verify range of distance attenuation parameters: 0.1 <= distAtt[0] <= distAtt[1] */
        /*                                                  0.0 <= distAtt[2] <= 10.0       */
        hRenderConfig->distAtt[0] = max( 0.1f, hRenderConfig->distAtt[0] );
@@ -1292,6 +1295,7 @@ ivas_error RenderConfigReader_checkValues(
            hRenderConfig->directivity[i * 3 + 1] = max( 0.0f, min( 360.0f, hRenderConfig->directivity[i * 3 + 1] ) );
            hRenderConfig->directivity[i * 3 + 2] = max( 0.0f, min( 1.0f, hRenderConfig->directivity[i * 3 + 2] ) );
        }
#endif
    }