ttyname_r() didn't pass correct buffer size to devname_r().

This commit is contained in:
Hajimu UMEMOTO 2005-05-20 14:56:55 +00:00
parent c9302692e6
commit db297254fe

View File

@ -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);
}