ECC-1703: GRIB: AddressSanitizer: heap-buffer-overflow

This commit is contained in:
Shahram Najm 2023-10-12 17:50:18 +00:00
parent 7101651b46
commit fa9f8ea763
1 changed files with 1 additions and 0 deletions

View File

@ -282,6 +282,7 @@ static int unpack_double(grib_accessor* a, double* values, size_t* len)
while (n < numberOfSecondOrderPackedValues) {
i += secondaryBitmap[n];
long fovi = 0;
// ECC-1703
if ( i >=0 && i < numberOfGroups )
fovi = firstOrderValues[i];
X[n] = fovi + X[n];