qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [PATCH v2] vt82c686: fix coverity warning about out-o


From: zhanghailiang
Subject: Re: [Qemu-trivial] [PATCH v2] vt82c686: fix coverity warning about out-of-bounds write
Date: Wed, 10 Dec 2014 17:20:38 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.1.1

On 2014/12/10 16:57, Michael Tokarev wrote:
09.12.2014 10:15, zhanghailiang wrote:
Refactor superio_ioport_writeb to fix the out of bounds write warning.

Is it just a warning, or real oob write?
From the code it looks like it's just a warning...


Er, i don't know when input 'data' will be oxff,
if this happens, it will access superio_conf->config[0xff] which is out of 
bounds
for superio_conf->config.

Actually, we should check the 'can_write' when access superio_conf->config[] in 
the follow codes,
but these codes seem a little odd, so refactor it is better choice. ;)


[]
+
+        }
+        if (can_write == true) {

09.12.2014 17:08, Paolo Bonzini wrote:
Michael, can you remove "== true" when applying this patch?

Sure, just did.  Does it mean I can add your R-b too? ;)


cc: Paolo

Thanks.
zhanghailiang






reply via email to

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