qemu/hw/sd
Michael Olbrich 8573378e62 hw/sd: fix out-of-bounds check for multi block reads
The current code checks if the next block exceeds the size of the card.
This generates an error while reading the last block of the card.
Do the out-of-bounds check when starting to read a new block to fix this.

This issue became visible with increased error checking in Linux 4.13.

Cc: qemu-stable@nongnu.org
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20170916091611.10241-1-m.olbrich@pengutronix.de
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-10-06 16:46:47 +01:00
..
Makefile.objs bcm2835_sdhost: add bcm2835 sdhost controller 2017-02-28 12:08:19 +00:00
bcm2835_sdhost.c bcm2835_sdhost: add bcm2835 sdhost controller 2017-02-28 12:08:19 +00:00
core.c hw/sd: add card-reparenting function 2017-02-28 17:10:00 +00:00
milkymist-memcard.c qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable 2017-05-17 10:37:00 -03:00
omap_mmc.c arm devices: Clean up includes 2016-01-29 15:07:25 +00:00
pl181.c qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable 2017-05-17 10:37:00 -03:00
pxa2xx_mmci.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
sd.c hw/sd: fix out-of-bounds check for multi block reads 2017-10-06 16:46:47 +01:00
sdhci-internal.h Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND 2016-03-22 22:20:17 +01:00
sdhci.c generic-sdhci: Remove user_creatable flag 2017-05-17 10:37:01 -03:00
ssi-sd.c vmstateify ssi-sd 2016-09-22 18:13:08 +01:00
trace-events trace-events: fix code style: print 0x before hex numbers 2017-08-01 12:13:07 +01:00