Re: [Qemu-devel] [PATCH for-2.12] hw/block/pflash_cfi: fix off-by-one error

2018-04-09 Thread Kevin Wolf
Am 05.04.2018 um 01:32 hat Philippe Mathieu-Daudé geschrieben: > ASAN reported: > > hw/block/pflash_cfi02.c:245:33: runtime error: index 82 out of bounds for > type 'uint8_t [82]' > > Since the 'cfi_len' member is not used, remove it to keep the code safer. > > Reported-by: AddressSanitizer

[Qemu-devel] [PATCH for-2.12] hw/block/pflash_cfi: fix off-by-one error

2018-04-04 Thread Philippe Mathieu-Daudé
ASAN reported: hw/block/pflash_cfi02.c:245:33: runtime error: index 82 out of bounds for type 'uint8_t [82]' Since the 'cfi_len' member is not used, remove it to keep the code safer. Reported-by: AddressSanitizer Signed-off-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi01.c | 10 -