summaryrefslogtreecommitdiffstats
path: root/src/godmode.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2016-07-02 09:25:28 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2016-07-02 09:25:28 +0200
commitd01e793ca4019f06480484a9d89942df6e6ddd8b (patch)
tree842f6433e75b155ec052772b64914af879dbf3a8 /src/godmode.c
parentb5dac5c818a949c2c60b82723c09044dd9c95326 (diff)
add an assertion in search_part()
Diffstat (limited to 'src/godmode.c')
-rw-r--r--src/godmode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/godmode.c b/src/godmode.c
index b1ddd65..2f2e588 100644
--- a/src/godmode.c
+++ b/src/godmode.c
@@ -896,7 +896,7 @@ static list_part_t *search_part(disk_t *disk_car, const list_part_t *list_part_o
}
{
const uint64_t next_part_offset=partition->part_offset+partition->part_size-1+1;
- const uint64_t head_size=disk_car->geom.sectors_per_head * disk_car->sector_size;
+ const uint64_t head_size=(uint64_t)disk_car->geom.sectors_per_head * disk_car->sector_size;
hint_insert(try_offset, next_part_offset, &try_offset_nbr);
hint_insert(try_offset, next_part_offset+head_size, &try_offset_nbr);
if(next_part_offset%head_size!=0)
@@ -1179,6 +1179,7 @@ static list_part_t *add_ext_part_i386(disk_t *disk, list_part_t *list_part, cons
}
if(deb==NULL)
return list_part;
+ assert(fin!=NULL);
if(nbr_entries==4 || max_ext!=0)
{
if(verbose>0)