From: Guido van Rossum Date: Mon, 13 Feb 1995 16:17:03 +0000 (+0000) Subject: null-terminate the error string in macstrerror X-Git-Tag: v1.2b3~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cc9bc8f824826a1b8a9326607a8cf34b10255d33;p=thirdparty%2FPython%2Fcpython.git null-terminate the error string in macstrerror --- diff --git a/Mac/Python/macglue.c b/Mac/Python/macglue.c index cbeeee71f4ef..53f130f2735e 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 {