12 Jul 2012 12:13
openpty: limits for name
Thomas Klausner <wiz <at> NetBSD.org>
2012-07-12 10:13:18 GMT
2012-07-12 10:13:18 GMT
A Linux man page I found for openpty says:
BUGS
Nobody knows how much space should be reserved for name. So,
calling openpty() or forkpty() with non-NULL name may not be secure.
Our man page is silent on that.
The code in libutil/pty.c just does:
if (name)
(void)strcpy(name, linep);
I wonder if we (can and) want to promise a limit in the man page, or
just add a comment like the one in the Linux man page.
Thomas
RSS Feed