diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/format/executable.c | 11 |
2 files changed, 15 insertions, 1 deletions
@@ -1,3 +1,8 @@ +17-08-18 Cyrille Bagard <nocbos@gmail.com> + + * src/format/executable.c: + Skip all empty binary portions as they are useless. + 17-08-17 Cyrille Bagard <nocbos@gmail.com> * src/analysis/disass/area.c: diff --git a/src/format/executable.c b/src/format/executable.c index ac67d62..6afe8b5 100644 --- a/src/format/executable.c +++ b/src/format/executable.c @@ -357,7 +357,16 @@ void g_exe_format_include_portion(GExeFormat *format, GBinPortion *portion, cons start = get_phy_addr(get_mrange_addr(range)); - if (start >= available) + if (get_mrange_length(range) == 0) + { + log_variadic_message(LMT_BAD_BINARY, _("The binary portion '%s' is empty and thus useless... Discarding!"), + g_binary_portion_get_desc(portion)); + + g_object_unref(G_OBJECT(portion)); + + } + + else if (start >= available) { assert(origin != NULL); |