aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-01-11 19:09:13 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-01-11 19:09:14 +0000
commit1fa404b60f7ccae99b9db3b187296b6b053805ea (patch)
tree9b6f35572918637df4c5b71e14eaf88caa29e230 /hw
parent27df21ca3886fff4dd3d70e515517667963a52f1 (diff)
parentb05b267840515730dbf6753495d5b7bd8b04ad1c (diff)
Merge remote-tracking branch 'remotes/kraxel/tags/vga-20190111-pull-request' into staging
vga: enable virtio test, fix ddc oob read # gpg: Signature made Fri 11 Jan 2019 13:58:12 GMT # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/vga-20190111-pull-request: i2c-ddc: fix oob read tests/display-vga: Enable virtio-vga test Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/i2c/i2c-ddc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/i2c/i2c-ddc.c b/hw/i2c/i2c-ddc.c
index be34fe072c..0a0367ff38 100644
--- a/hw/i2c/i2c-ddc.c
+++ b/hw/i2c/i2c-ddc.c
@@ -56,7 +56,7 @@ static int i2c_ddc_rx(I2CSlave *i2c)
I2CDDCState *s = I2CDDC(i2c);
int value;
- value = s->edid_blob[s->reg];
+ value = s->edid_blob[s->reg % sizeof(s->edid_blob)];
s->reg++;
return value;
}