Testing: Fix clang address sanitizer errors

This commit is contained in:
Shahram Najm 2021-06-21 15:24:06 +01:00
parent 4e5adb7915
commit e8bf0aa855
2 changed files with 5 additions and 3 deletions

View File

@ -167,6 +167,8 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len)
if (!a->dirty)
return GRIB_SUCCESS;
DebugAssert(*len == self->number_of_elements);
if ((ret = grib_get_string(grib_handle_of_accessor(a), self->verifyingMonth, verifyingMonth, &slen)) != GRIB_SUCCESS)
return ret;

View File

@ -126,8 +126,8 @@ grib_check_key_equals $temp 'mars.origin:s' 'lops'
${tools_dir}/grib_set -s \
setLocalDefinition=1,localDefinitionNumber=16,numberOfForecastsInEnsemble=51,verifyingMonth=11 \
$sample_g1 $temp
grib_check_key_equals $temp 'totalNumber,endOfInterval' '51 0'
grib_check_key_equals $temp 'totalNumber' '51'
grib_check_key_equals $temp 'yearOfEndOfOverallTimeInterval,monthOfEndOfOverallTimeInterval,dayOfEndOfOverallTimeInterval' '0 11 30'
# Local Definition 49 for GRIB1
# -----------------------------