summaryrefslogtreecommitdiff
path: root/numpy/f2py/src/fortranobject.c
diff options
context:
space:
mode:
authorBob Eldering <eldering@jive.eu>2017-07-05 17:36:23 +0200
committerBob Eldering <eldering@jive.eu>2017-07-05 17:36:23 +0200
commitc8ec7378b32f788d04a346c12aabb319b3627be7 (patch)
treedf2514d5af5829a6748417ffe27b9fbf3f60807b /numpy/f2py/src/fortranobject.c
parent14cd918c651d72f4c2a8681093e114f01d5bdc36 (diff)
downloadnumpy-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.c3
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) {