From 4f605c32e616fadb1126f20e9a8ec59b19ebd8c9 Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Sat, 17 Mar 2018 17:46:47 +0100 Subject: [PATCH] Avoid a null pointer dereference in ntfs_dump() --- src/ntfs_adv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ntfs_adv.c b/src/ntfs_adv.c index 1a30c0f0..738ed0f0 100644 --- a/src/ntfs_adv.c +++ b/src/ntfs_adv.c @@ -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);