1. Jason R. Coombs
  2. cpython-issue12666

Commits

Guido van Rossum  committed faaece7

null-terminate the error string in macstrerror

  • Participants
  • Parent commits 3dfef67
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Mac/Python/macglue.c

View file
 		HLock(h);
 		str = (char *)*h;
 		memcpy(buf, str+1, (unsigned char)str[0]);
+		buf[(unsigned char)str[0]] = '\0';
 		HUnlock(h);
 		ReleaseResource(h);
 	} else {