diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-02-11 17:05:54 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-02-11 17:05:54 (GMT) |
commit | bf879f2562545ab7de23f9d38364b7bd4b43fb2c (patch) | |
tree | 6154160307cbca304ea9e1de178d8c2dfc8e0928 /src/format/pe/pe.c | |
parent | abd96dbbe27246e9303173e5e2f47b2e4cedbcb7 (diff) |
Registered all the supported formats in the system code.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@471 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/pe/pe.c')
-rw-r--r-- | src/format/pe/pe.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/format/pe/pe.c b/src/format/pe/pe.c index 88756dd..39560ce 100644 --- a/src/format/pe/pe.c +++ b/src/format/pe/pe.c @@ -55,9 +55,7 @@ static bool g_pe_format_translate_offset_into_address(const GPeFormat *, off_t, /****************************************************************************** * * -* Paramètres : type = type de format recherché. * -* content = contenu binaire à parcourir. * -* length = taille du contenu en question. * +* Paramètres : content = contenu binaire à parcourir. * * * * Description : Indique si le format peut être pris en charge ici. * * * @@ -67,13 +65,13 @@ static bool g_pe_format_translate_offset_into_address(const GPeFormat *, off_t, * * ******************************************************************************/ -bool pe_is_matching(FormatType type, const uint8_t *content, off_t length) +bool pe_is_matching(GBinContent *content) { bool result; /* Bilan à faire connaître */ image_dos_header dos_header; /* En-tête DOS */ result = false; - +#if 0 if (length >= 2) { result = (strncmp((const char *)content, "\x4d\x5a" /* MZ */, 2) == 0); @@ -90,7 +88,7 @@ bool pe_is_matching(FormatType type, const uint8_t *content, off_t length) "\x50\x45\x00\x00" /* PE00 */, 4) == 0); } - +#endif return result; } @@ -168,7 +166,7 @@ GBinFormat *g_pe_format_new(const bin_t *content, off_t length) result = g_object_new(G_TYPE_PE_FORMAT, NULL); - g_binary_format_set_content(G_BIN_FORMAT(result), content, length); + //g_binary_format_set_content(G_BIN_FORMAT(result), content, length); offset = 0; |