diff options
author | Bob Eldering <eldering@jive.eu> | 2017-07-05 17:36:23 +0200 |
---|---|---|
committer | Bob Eldering <eldering@jive.eu> | 2017-07-05 17:36:23 +0200 |
commit | c8ec7378b32f788d04a346c12aabb319b3627be7 (patch) | |
tree | df2514d5af5829a6748417ffe27b9fbf3f60807b /numpy/f2py/src/fortranobject.c | |
parent | 14cd918c651d72f4c2a8681093e114f01d5bdc36 (diff) | |
download | numpy-c8ec7378b32f788d04a346c12aabb319b3627be7.tar.gz |
BUG: ')' is printed at the end pointer of the buffer in numpy.f2py.
When building the __doc__ string for Fortran objects, the ')'
character, closing the dimensions list, is written 1 position
beyond the allowed buffer size, instead of the current pointer in
the buffer.
Diffstat (limited to 'numpy/f2py/src/fortranobject.c')
-rw-r--r-- | numpy/f2py/src/fortranobject.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/f2py/src/fortranobject.c b/numpy/f2py/src/fortranobject.c index 8c8b4ae5d..72854db47 100644 --- a/numpy/f2py/src/fortranobject.c +++ b/numpy/f2py/src/fortranobject.c @@ -130,8 +130,7 @@ format_def(char *buf, Py_ssize_t size, FortranDataDef def) return -1; } - p[size] = ')'; - p++; + *p++ = ')'; size--; if (def.data == NULL) { |