mirror of https://github.com/ecmwf/eccodes.git
fixed memory error
This commit is contained in:
parent
308944fbf4
commit
0461c32b06
|
@ -2727,7 +2727,7 @@ int grib_f_get_string_array_(int* gid, char* key, char* val,int* nvals,int* slen
|
||||||
if (strlen(cval[0])>*slen) err=GRIB_ARRAY_TOO_SMALL;
|
if (strlen(cval[0])>*slen) err=GRIB_ARRAY_TOO_SMALL;
|
||||||
|
|
||||||
for (i=0;i<lsize;i++) {
|
for (i=0;i<lsize;i++) {
|
||||||
memcpy(p,cval[i],*slen);
|
strcpy(p,cval[i]);
|
||||||
czstr_to_fortran(p,*slen);
|
czstr_to_fortran(p,*slen);
|
||||||
p+= *slen;
|
p+= *slen;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue