diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2017-08-17 22:11:51 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2017-08-17 22:11:51 (GMT) |
commit | 9841343bcf0e93fd5d72e5f41c7e2b9939063568 (patch) | |
tree | 0c3a7734ec7dc91e66aa87232eaeee532164b309 | |
parent | db74e3650d31e937db356c6a8b7fd4e3c208dc4d (diff) |
Skipped all empty binary portions as they are useless.
-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); |