summaryrefslogtreecommitdiffstats
path: root/src/parti386.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/parti386.c
parente1d86c408e1c3a248b86b13b517a0b52a48f3e4c (diff)
Avoid a NULL dereference when listing an NTFS partition after RebuildBS
Diffstat (limited to 'src/parti386.c')
-rw-r--r--src/parti386.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/parti386.c b/src/parti386.c
index 962115e..a0662d9 100644
--- a/src/parti386.c
+++ b/src/parti386.c
@@ -33,6 +33,7 @@
#include <string.h>
#endif
#include <ctype.h> /* tolower */
+#include <assert.h>
#include "types.h"
#include "common.h"
#include "fnctdsk.h"
@@ -1222,6 +1223,7 @@ list_part_t *add_partition_i386_cli(disk_t *disk_car, list_part_t *list_part, ch
{
CHS_t start,end;
partition_t *new_partition=partition_new(&arch_i386);
+ assert(current_cmd!=NULL);
start.cylinder=0;
start.head=0;
start.sector=1;