diff options
author | Guido van Rossum <guido@python.org> | 1995-02-13 16:17:03 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-02-13 16:17:03 (GMT) |
commit | cc9bc8f824826a1b8a9326607a8cf34b10255d33 (patch) | |
tree | d1433964c3f94cb63e3e1ace31f3e9a1eee6df4e | |
parent | e6c884cadbcfcecbad261f8b45f32aa116902682 (diff) | |
download | cpython-cc9bc8f824826a1b8a9326607a8cf34b10255d33.zip cpython-cc9bc8f824826a1b8a9326607a8cf34b10255d33.tar.gz cpython-cc9bc8f824826a1b8a9326607a8cf34b10255d33.tar.bz2 |
null-terminate the error string in macstrerror
-rw-r--r-- | Mac/Python/macglue.c | 1 |
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 { |