mirror of https://github.com/ecmwf/eccodes.git
Initialise buffers
This commit is contained in:
parent
21298e4489
commit
72365c5bb3
|
@ -133,6 +133,7 @@ static int unpack_string(grib_accessor* a, char* val, size_t* len)
|
|||
if (v[i] > 126)
|
||||
v[i] = 32;
|
||||
memcpy(val, grib_handle_of_accessor(a)->buffer->data, slen);
|
||||
val[i] = 0;
|
||||
|
||||
*len = slen;
|
||||
|
||||
|
|
|
@ -100,9 +100,9 @@ GRIB_INLINE static int grib_inline_strcmp(const char* a, const char* b)
|
|||
static int evaluate_long(grib_expression* g, grib_handle* h, long* lres)
|
||||
{
|
||||
int ret = 0;
|
||||
char b1[1024];
|
||||
char b1[1024] = {0,};
|
||||
size_t l1 = sizeof(b1);
|
||||
char b2[1024];
|
||||
char b2[1024] = {0,};
|
||||
size_t l2 = sizeof(b2);
|
||||
const char* v1 = NULL;
|
||||
const char* v2 = NULL;
|
||||
|
|
Loading…
Reference in New Issue