BUFR decode: Check error code before asserting

This commit is contained in:
Shahram Najm 2022-04-26 15:38:53 +01:00
parent 81c3b813ab
commit 523e950ea7
1 changed files with 4 additions and 0 deletions

View File

@ -646,6 +646,10 @@ static void dump_string(grib_dumper* d, grib_accessor* a, const char* comment)
self->empty = 0;
err = grib_unpack_string(a, value, &size);
if (err) {
fprintf(self->dumper.out, " *** ERR=%d (%s) [dump_string on '%s']", err, grib_get_error_message(err), acc_name);
return;
}
Assert(size < MAX_STRING_SIZE);
p = value;
r = compute_bufr_key_rank(h, self->keys, acc_name);