Loading...
--- Libc/Libc-763.13/util/pty.c
+++ Libc/Libc-1353.100.2/util/pty.c
@@ -76,12 +76,12 @@
 	struct winsize *winp;
 {
 	int master, slave;
-	char *sname;
+	char sname[128];
 
 	if ((master = posix_openpt(O_RDWR|O_NOCTTY)) < 0)
 		return -1;
 	if (grantpt(master) < 0 || unlockpt(master) < 0
-	    || (sname = ptsname(master)) == NULL
+	    || ptsname_r(master, sname, sizeof(sname)) == -1
 	    || (slave = open(sname, O_RDWR|O_NOCTTY, 0)) < 0) {
 		(void) close(master);
 		return -1;