Skip to content
Snippets Groups Projects
Commit 8573378e authored by Michael Olbrich's avatar Michael Olbrich Committed by Peter Maydell
Browse files

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: default avatarMichael Olbrich <m.olbrich@pengutronix.de>
Reviewed-by: default avatarAlistair Francis <alistair.francis@xilinx.com>
Message-id: 20170916091611.10241-1-m.olbrich@pengutronix.de
Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parent 77077a83
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment