[Qemu-devel] [PULL 23/25] sd: Fix out-of-bounds assertions

2019-06-21 Thread Paolo Bonzini
From: Lidong Chen Due to an off-by-one error, the assert statements allow an out-of-bound array access. This doesn't happen in practice, but the static analyzer notices. Signed-off-by: Lidong Chen Reviewed-by: Liam Merwick Reviewed-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé

[Qemu-devel] [PULL 23/25] sd: Fix out-of-bounds assertions

2019-06-20 Thread Paolo Bonzini
From: Lidong Chen Due to an off-by-one error, the assert statements allow an out-of-bound array access. This doesn't happen in practice, but the static analyzer notices. Signed-off-by: Lidong Chen Reviewed-by: Liam Merwick Reviewed-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé