diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/analysis/disass/area.c | 1 | ||||
-rw-r--r-- | src/glibext/gbinportion.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/analysis/disass/area.c b/src/analysis/disass/area.c index c2fee99..5f63c82 100644 --- a/src/analysis/disass/area.c +++ b/src/analysis/disass/area.c @@ -2212,6 +2212,7 @@ mem_area *compute_memory_areas(GExeFormat *format, phys_t bin_length, size_t *co printf("--------------------\n"); portions = NULL;//g_exe_format_get_portions_at_level(format, -1, &portions_count); + portions_count = 0; for (i = 1; i < portions_count; i++) diff --git a/src/glibext/gbinportion.c b/src/glibext/gbinportion.c index 0744a79..454fc6b 100644 --- a/src/glibext/gbinportion.c +++ b/src/glibext/gbinportion.c @@ -1003,6 +1003,8 @@ GBinPortion **g_portion_layer_collect_all_portions(const GPortionLayer *layer, s } + *count = 0; + result = do_collect(layer, NULL, count); qsort(result, *count, sizeof(GBinPortion *), (__compar_fn_t)g_binary_portion_compare); |