diff options
Diffstat (limited to 'io')
-rw-r--r-- | io/channel-socket.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/io/channel-socket.c b/io/channel-socket.c index 02ffb51..3a899b0 100644 --- a/io/channel-socket.c +++ b/io/channel-socket.c @@ -782,6 +782,11 @@ static int qio_channel_socket_flush(QIOChannel *ioc, "Error not from zero copy"); return -1; } + if (serr->ee_data < serr->ee_info) { + error_setg_errno(errp, serr->ee_origin, + "Wrong notification bounds"); + return -1; + } /* No errors, count successfully finished sendmsg()*/ sioc->zero_copy_sent += serr->ee_data - serr->ee_info + 1; |