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

also ensure that write buffer is bounded when __stdio_write returns

assuming other code is correct, this should be a no-op, but better to
be safe...
上级 b5a8b289
......@@ -22,6 +22,7 @@ size_t __stdio_write(FILE *f, const unsigned char *buf, size_t len)
cnt = syscall_cp(SYS_writev, f->fd, iov, iovcnt);
pthread_cleanup_pop(0);
if (cnt == rem) {
f->wend = f->buf + f->buf_size;
f->wpos = f->wbase = f->buf;
return len;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册