summaryrefslogtreecommitdiffstats
path: root/src/adv.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2018-02-07 18:12:38 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2018-02-07 18:12:38 +0100
commit78380d72f73557646907bd7f92e6e7d5fd68a1af (patch)
tree64eef70086c14a5a9e2bba8b4c54e71217e22943 /src/adv.c
parente1d86c408e1c3a248b86b13b517a0b52a48f3e4c (diff)
Avoid a NULL dereference when listing an NTFS partition after RebuildBS
Diffstat (limited to 'src/adv.c')
-rw-r--r--src/adv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/adv.c b/src/adv.c
index 0a6e693..a681432 100644
--- a/src/adv.c
+++ b/src/adv.c
@@ -215,6 +215,7 @@ static int adv_string_to_command(char**current_cmd, list_part_t **current_elemen
{
int keep_asking;
int command='q';
+ assert(current_cmd!=NULL);
do
{
keep_asking=0;
@@ -474,6 +475,7 @@ void interface_adv(disk_t *disk_car, const int verbose,const int dump_ind, const
unsigned int menu=0;
list_part_t *list_part;
list_part_t *current_element;
+ assert(current_cmd!=NULL);
log_info("\nInterface Advanced\n");
list_part=disk_car->arch->read_part(disk_car,verbose,0);
current_element=list_part;