diff options
author | ume <ume@FreeBSD.org> | 2005-05-20 14:56:55 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2005-05-20 14:56:55 +0000 |
commit | e0c02ed147618840818df19cef20fed49b79964b (patch) | |
tree | c162b1e6b5e43617f53b528f8238da189ecc63f0 /lib/libc | |
parent | e956f972dadf024409c8691ea9053a8679f3aa5f (diff) | |
download | FreeBSD-src-e0c02ed147618840818df19cef20fed49b79964b.zip FreeBSD-src-e0c02ed147618840818df19cef20fed49b79964b.tar.gz |
ttyname_r() didn't pass correct buffer size to devname_r().
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/ttyname.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/ttyname.c b/lib/libc/gen/ttyname.c index 56e7ce1..013796c 100644 --- a/lib/libc/gen/ttyname.c +++ b/lib/libc/gen/ttyname.c @@ -85,7 +85,7 @@ ttyname_r(int fd, char *buf, size_t len) if (!_ioctl(fd, FIODGNAME, &fgn)) return (0); devname_r(sb.st_rdev, S_IFCHR, - buf + strlen(buf), sizeof(buf) - strlen(buf)); + buf + strlen(buf), len - strlen(buf)); return (0); } |