diff options
| author | Jean-Christophe Dubois | 2017-01-09 12:40:23 +0100 |
|---|---|---|
| committer | Peter Maydell | 2017-01-09 12:40:23 +0100 |
| commit | 24cb2e0d57cea0cbc163f23fa47d530b35425a21 (patch) | |
| tree | 43a73f13f9bb22940a818e9e863f2bc66cd0015c /scripts/checkpatch.pl | |
| parent | hw/arm/virt-acpi-build: Don't incorrectly claim architectural timer to be edg... (diff) | |
| download | qemu-24cb2e0d57cea0cbc163f23fa47d530b35425a21.tar.gz qemu-24cb2e0d57cea0cbc163f23fa47d530b35425a21.tar.xz qemu-24cb2e0d57cea0cbc163f23fa47d530b35425a21.zip | |
m25p80: don't let rogue SPI controllers cause buffer overruns
In normal operation we should never attempt to put more
data into the data[] array than it can hold. However if the
SPI controller connected to us misbehaves then it can send
us a sequence of commands that attempt this. Since the
controller might be in the guest (if the hardware does SPI
via bit-banging), catch the possible overrun conditions and
reset the flash internal state, logging them as guest errors.
Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
Message-id: 20170107111631.24444-1-jcd@tribudubois.net
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
[PMM: rewrote commit message to be more exact about when
this can happen]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts/checkpatch.pl')
0 files changed, 0 insertions, 0 deletions
