提交 fcfba995 编写于 作者: R Rich Felker

fix broken ttyname[_r] (failure to null-terminate result)

上级 fb247faf
......@@ -15,5 +15,8 @@ int ttyname_r(int fd, char *name, size_t size)
if (l < 0) return errno;
else if (l == size) return ERANGE;
else return 0;
else {
name[l] = 0;
return 0;
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册