summaryrefslogtreecommitdiffstats
path: root/Mac/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-02-13 16:17:03 (GMT)
committerGuido van Rossum <guido@python.org>1995-02-13 16:17:03 (GMT)
commitcc9bc8f824826a1b8a9326607a8cf34b10255d33 (patch)
treed1433964c3f94cb63e3e1ace31f3e9a1eee6df4e /Mac/Python
parente6c884cadbcfcecbad261f8b45f32aa116902682 (diff)
downloadcpython-cc9bc8f824826a1b8a9326607a8cf34b10255d33.zip
cpython-cc9bc8f824826a1b8a9326607a8cf34b10255d33.tar.gz
cpython-cc9bc8f824826a1b8a9326607a8cf34b10255d33.tar.bz2
null-terminate the error string in macstrerror
Diffstat (limited to 'Mac/Python')
-rw-r--r--Mac/Python/macglue.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Mac/Python/macglue.c b/Mac/Python/macglue.c
index cbeeee7..53f130f 100644
--- a/Mac/Python/macglue.c
+++ b/Mac/Python/macglue.c
@@ -123,6 +123,7 @@ char *macstrerror(int err)
HLock(h);
str = (char *)*h;
memcpy(buf, str+1, (unsigned char)str[0]);
+ buf[(unsigned char)str[0]] = '\0';
HUnlock(h);
ReleaseResource(h);
} else {