summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2018-03-17 17:46:47 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2018-03-17 17:46:47 +0100
commit4f605c32e616fadb1126f20e9a8ec59b19ebd8c9 (patch)
treedf973efcd84edbd4089b9a9bca9967de6a76e214
parentd9e72dedd3fedab30ca5a3f0c9cf466bd9289ea7 (diff)
Avoid a null pointer dereference in ntfs_dump()
-rw-r--r--src/ntfs_adv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ntfs_adv.c b/src/ntfs_adv.c
index 1a30c0f..738ed0f 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);