Avoid a null pointer dereference in ntfs_dump()

This commit is contained in:
Christophe Grenier 2018-03-17 17:46:47 +01:00
parent d9e72dedd3
commit 4f605c32e6

View file

@ -89,7 +89,7 @@ static void ntfs_dump(disk_t *disk_car, const partition_t *partition, const unsi
{
log_info(" Rebuild Boot sector Boot sector\n");
dump2_log(newboot, orgboot, NTFS_SECTOR_SIZE);
if(*current_cmd==NULL)
if(current_cmd==NULL || *current_cmd==NULL)
{
#ifdef HAVE_NCURSES
ntfs_dump_ncurses(disk_car, partition, orgboot, newboot);