mirror of https://github.com/ecmwf/eccodes.git
Merge branch 'develop' of github.com:ecmwf/eccodes into develop
This commit is contained in:
commit
41a0cb2cfd
|
@ -102,6 +102,7 @@ int grib_accessor_md5_t::unpack_string(char* v, size_t* len)
|
|||
mess = (unsigned char*)grib_context_malloc(context_, length);
|
||||
memcpy(mess, grib_handle_of_accessor(this)->buffer->data + offset, length);
|
||||
mess_len = length;
|
||||
const unsigned char* pEnd = mess + length - 1;
|
||||
|
||||
blocklist = context_->blocklist;
|
||||
/* passed blocklist overrides context blocklist.
|
||||
|
@ -117,8 +118,10 @@ int grib_accessor_md5_t::unpack_string(char* v, size_t* len)
|
|||
}
|
||||
|
||||
p = mess + b->offset_ - offset;
|
||||
for (i = 0; i < b->length_; i++)
|
||||
for (i = 0; i < b->length_; i++) {
|
||||
if (p > pEnd) break;
|
||||
*(p++) = 0;
|
||||
}
|
||||
|
||||
blocklist = blocklist->next;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue