• Mike Frysinger's avatar
    flash_protect: check for NULL flash info · a4e8d9f5
    Mike Frysinger authored
    If a flash is unable to be detected, and then someone calls flash_protect
    on it (like the common code does in flash_init), the flash_protect logic
    will dereference a NULL pointer.
    
    Since flash_protect already does sanity checking on the info structs, add
    a NULL pointer check in there.
    Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
    a4e8d9f5
flash.c 6.06 KB