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