ECC-1431: Simplified output buffer size formula

This commit is contained in:
Eugen Betke 2022-07-28 13:41:03 +02:00
parent f1dd44073c
commit ebf6d7897d
1 changed files with 1 additions and 1 deletions

View File

@ -511,7 +511,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
grib_context_log(a->context, GRIB_LOG_DEBUG,"CCSDS pack_double: packing %s, %d values", a->name, n_vals);
/*ECC-1431: GRIB2: CCSDS encoding failure AEC_STREAM_ERROR*/
buflen = buflen * 67.0/64 + 257;
buflen += buflen / 20 + 256;
buf = (unsigned char*)grib_context_buffer_malloc_clear(a->context, buflen);
if (!buf) {