summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2005-05-20 14:56:55 +0000
committerume <ume@FreeBSD.org>2005-05-20 14:56:55 +0000
commite0c02ed147618840818df19cef20fed49b79964b (patch)
treec162b1e6b5e43617f53b528f8238da189ecc63f0 /lib
parente956f972dadf024409c8691ea9053a8679f3aa5f (diff)
downloadFreeBSD-src-e0c02ed147618840818df19cef20fed49b79964b.zip
FreeBSD-src-e0c02ed147618840818df19cef20fed49b79964b.tar.gz
ttyname_r() didn't pass correct buffer size to devname_r().
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/ttyname.c2
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);
}
OpenPOWER on IntegriCloud