summaryrefslogtreecommitdiff
path: root/src/format/executable.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-07-24 18:43:55 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-07-24 18:43:55 (GMT)
commit156d2e2f6beda2302552ac79678494d914fda05b (patch)
tree021825960b7ac3315a336fc085a4f1d07c05df39 /src/format/executable.c
parent21537636cd8318cf5a720211619ad3c3023b52e9 (diff)
Replaced all remaining raw accesses to binary contents with the GBinContent wrapper in binary formats.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@555 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/executable.c')
-rw-r--r--src/format/executable.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/format/executable.c b/src/format/executable.c
index 1a66ffc..ab5543a 100644
--- a/src/format/executable.c
+++ b/src/format/executable.c
@@ -124,13 +124,16 @@ const char *g_exe_format_get_target_machine(const GExeFormat *format)
GBinPortion *g_exe_format_get_portions(GExeFormat *format)
{
vmpa2t addr; /* Emplacement vide de sens */
+ phys_t length; /* Taille de portion globale */
if (format->portions == NULL)
{
format->portions = g_binary_portion_new(BPC_RAW);
init_vmpa(&addr, 0, VMPA_NO_VIRTUAL);
- g_binary_portion_set_values(format->portions, &addr, G_BIN_FORMAT(format)->length);
+ length = g_binary_content_compute_size(G_BIN_FORMAT(format)->content);
+
+ g_binary_portion_set_values(format->portions, &addr, length);
if (format->refine_portions != NULL)
format->refine_portions(format, format->portions);