diff options
| author | Guido van Rossum <guido@python.org> | 1995-02-13 16:17:03 +0000 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 1995-02-13 16:17:03 +0000 |
| commit | cc9bc8f824826a1b8a9326607a8cf34b10255d33 (patch) | |
| tree | d1433964c3f94cb63e3e1ace31f3e9a1eee6df4e /Mac/Python/macglue.c | |
| parent | e6c884cadbcfcecbad261f8b45f32aa116902682 (diff) | |
| download | cpython-git-cc9bc8f824826a1b8a9326607a8cf34b10255d33.tar.gz | |
null-terminate the error string in macstrerror
Diffstat (limited to 'Mac/Python/macglue.c')
| -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 cbeeee71f4..53f130f273 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 { |
