diff --git a/lib_com/ivas_ism_com.c b/lib_com/ivas_ism_com.c index 344f346d474405ff1e7199235380252c08a5759b..69cfd10b0725bb33ecf468a6a2de88e12ca4843f 100644 --- a/lib_com/ivas_ism_com.c +++ b/lib_com/ivas_ism_com.c @@ -596,13 +596,17 @@ ISM_MODE ivas_ism_mode_select( * ---------------------------------------------------------------*/ void ivas_ism_metadata_close( - ISM_METADATA_HANDLE hIsmMetaData[], /* i/o : object metadata handles */ - const int16_t first_idx /* i : index of first handle to deallocate */ + ISM_METADATA_HANDLE hIsmMetaData[], /* i/o: object metadata handles */ + const int16_t first_idx /* i : index of first handle to deallocate */ ) { int16_t n; +#ifdef FIX_852_FIX_HANDLE_DEREF + if ( hIsmMetaData == NULL || *hIsmMetaData == NULL ) +#else if ( hIsmMetaData == NULL || hIsmMetaData == NULL ) +#endif { return; } diff --git a/lib_com/options.h b/lib_com/options.h index bf8f5631671b0ec14db624c5aa3f4f0eaffdc8b6..c7af60bf39339b008620426570457ee1ac44f0b3 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -152,6 +152,7 @@ #define FIX_854_ARRAY_SIZE_MISMATCH /* VA: issue 854: correct the mismatch between definition and declaration of `ivas_core_dec() */ #define FIX_785_REMOVE_DEAD_CODE /* VA: issue 785: remove dead code */ +#define FIX_852_FIX_HANDLE_DEREF /* VA: issue 852: Fix missing handle dereferencing of hIsmMetadaData in ivas_ism_metadata_close() */ /* #################### End BE switches ################################## */