]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
null-terminate the error string in macstrerror
authorGuido van Rossum <guido@python.org>
Mon, 13 Feb 1995 16:17:03 +0000 (16:17 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 13 Feb 1995 16:17:03 +0000 (16:17 +0000)
Mac/Python/macglue.c

index cbeeee71f4ef753d5f27485903dbe0f1b9a8d1b2..53f130f2735e1ab74526d35eeaf64459ecf7dabc 100644 (file)
@@ -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 {