summaryrefslogtreecommitdiffstats
path: root/src/partxbox.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/partxbox.c
parente1d86c408e1c3a248b86b13b517a0b52a48f3e4c (diff)
Avoid a NULL dereference when listing an NTFS partition after RebuildBS
Diffstat (limited to 'src/partxbox.c')
-rw-r--r--src/partxbox.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/partxbox.c b/src/partxbox.c
index c426b99..699264d 100644
--- a/src/partxbox.c
+++ b/src/partxbox.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"
@@ -147,6 +148,7 @@ static list_part_t *init_part_order_xbox(const disk_t *disk_car, list_part_t *li
list_part_t *add_partition_xbox_cli(disk_t *disk_car,list_part_t *list_part, char **current_cmd)
{
partition_t *new_partition=partition_new(&arch_xbox);
+ assert(current_cmd!=NULL);
new_partition->part_offset=disk_car->sector_size;
new_partition->part_size=disk_car->disk_size-disk_car->sector_size;
while(*current_cmd[0]==',')