summaryrefslogtreecommitdiff
path: root/src/format
diff options
context:
space:
mode:
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);