aboutsummaryrefslogtreecommitdiff
path: root/slirp/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'slirp/socket.c')
-rw-r--r--slirp/socket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/slirp/socket.c b/slirp/socket.c
index 462240924f..7bc0dc5f32 100644
--- a/slirp/socket.c
+++ b/slirp/socket.c
@@ -116,6 +116,8 @@ soread(so)
len = sb->sb_datalen - sb->sb_cc;
iov[0].iov_base = sb->sb_wptr;
+ iov[1].iov_base = NULL;
+ iov[1].iov_len = 0;
if (sb->sb_wptr < sb->sb_rptr) {
iov[0].iov_len = sb->sb_rptr - sb->sb_wptr;
/* Should never succeed, but... */
@@ -319,6 +321,8 @@ sowrite(so)
len = sb->sb_cc;
iov[0].iov_base = sb->sb_rptr;
+ iov[1].iov_base = NULL;
+ iov[1].iov_len = 0;
if (sb->sb_rptr < sb->sb_wptr) {
iov[0].iov_len = sb->sb_wptr - sb->sb_rptr;
/* Should never succeed, but... */