44633a2 hw/block/pflash_cfi: fix off-by-one error

2 files Authored by Philippe Mathieu-Daudé 5 years ago, Committed by Michael Roth 5 years ago,
    hw/block/pflash_cfi: fix off-by-one error
    
    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.
    
    Cc: qemu-stable@nongnu.org
    Reported-by: AddressSanitizer
    Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    (cherry picked from commit 07c13a71721d9f8c690b66752964e254af247475)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    
        
file modified
+4 -6
file modified
+4 -5