diff Mac/Python/macglue.c @ 2324:faaece7ccd6e legacy-trunk

null-terminate the error string in macstrerror
author Guido van Rossum <guido@python.org>
date Mon, 13 Feb 1995 16:17:03 +0000
parents 40aec48cd1e2
children 6468fd0251d2
line wrap: on
line diff
--- a/Mac/Python/macglue.c	Mon Feb 13 16:16:22 1995 +0000
+++ b/Mac/Python/macglue.c	Mon Feb 13 16:17:03 1995 +0000
@@ -123,6 +123,7 @@
 		HLock(h);
 		str = (char *)*h;
 		memcpy(buf, str+1, (unsigned char)str[0]);
+		buf[(unsigned char)str[0]] = '\0';
 		HUnlock(h);
 		ReleaseResource(h);
 	} else {