projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2077ec
)
i2c-ddc: fix oob read
author
Gerd Hoffmann
<kraxel@redhat.com>
Tue, 8 Jan 2019 10:23:01 +0000
(11:23 +0100)
committer
Gerd Hoffmann
<kraxel@redhat.com>
Fri, 11 Jan 2019 10:45:00 +0000
(11:45 +0100)
Suggested-by: Michael Hanselmann <public@hansmi.ch>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Michael Hanselmann <public@hansmi.ch>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id:
20190108102301
.1957-1-kraxel@redhat.com
hw/i2c/i2c-ddc.c
patch
|
blob
|
history
diff --git
a/hw/i2c/i2c-ddc.c
b/hw/i2c/i2c-ddc.c
index be34fe072cf1f7db9ca36c307f099d08455963f6..0a0367ff38f993bc379f8a1abc35295ec9b9f691 100644
(file)
--- 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;
}