From bdb3321519ab7cbe277e9823cc0e890604e5c2fa Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Fri, 21 Jul 2017 18:34:22 +0100 Subject: [PATCH] ECC-435: CRASH: Python keys iterator on GRIB message --- python/gribapi/gribapi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/gribapi/gribapi.py b/python/gribapi/gribapi.py index a69035369..57341791c 100644 --- a/python/gribapi/gribapi.py +++ b/python/gribapi/gribapi.py @@ -996,8 +996,9 @@ def grib_get_string_array(msgid, key): GRIB_CHECK(_internal.grib_c_get_string_array(msgid, key, a, s)) + newsize = s.value() result = list() - for i in range(nval): + for i in range(newsize): result.append(_internal.stringArray_getitem(a, i)) _internal.delete_stringArray(a)