aboutsummaryrefslogtreecommitdiff
path: root/hw/ide
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ide')
-rw-r--r--hw/ide/atapi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index 14a2b0bb2f..e79157863f 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -276,6 +276,8 @@ void ide_atapi_cmd_reply_end(IDEState *s)
s->packet_transfer_size -= size;
s->elementary_transfer_size -= size;
s->io_buffer_index += size;
+ assert(size <= s->io_buffer_total_len);
+ assert(s->io_buffer_index <= s->io_buffer_total_len);
/* Some adapters process PIO data right away. In that case, we need
* to avoid mutual recursion between ide_transfer_start