qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 4/7] ide: Fix off-by-one error in array index ch


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 4/7] ide: Fix off-by-one error in array index check
Date: Thu, 27 Oct 2011 09:32:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1

On 10/26/2011 02:31 PM, Kevin Wolf wrote:
Signed-off-by: Kevin Wolf<address@hidden>
---
  hw/ide/core.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/ide/core.c b/hw/ide/core.c
index 280a117..29305d3 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -2039,7 +2039,7 @@ static int ide_drive_pio_post_load(void *opaque, int 
version_id)
  {
      IDEState *s = opaque;

-    if (s->end_transfer_fn_idx>  ARRAY_SIZE(transfer_end_table)) {
+    if (s->end_transfer_fn_idx>= ARRAY_SIZE(transfer_end_table)) {
          return -EINVAL;
      }
      s->end_transfer_func = transfer_end_table[s->end_transfer_fn_idx];

Reviewed-by: Paolo Bonzini <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]