summaryrefslogtreecommitdiff
path: root/src/format
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-08-17 22:11:51 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-08-17 22:11:51 (GMT)
commit9841343bcf0e93fd5d72e5f41c7e2b9939063568 (patch)
tree0c3a7734ec7dc91e66aa87232eaeee532164b309 /src/format
parentdb74e3650d31e937db356c6a8b7fd4e3c208dc4d (diff)
Skipped all empty binary portions as they are useless.
Diffstat (limited to 'src/format')
-rw-r--r--src/format/executable.c11
1 files changed, 10 insertions, 1 deletions
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);