diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-07-24 18:43:55 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-07-24 18:43:55 (GMT) |
commit | 156d2e2f6beda2302552ac79678494d914fda05b (patch) | |
tree | 021825960b7ac3315a336fc085a4f1d07c05df39 /src/format/pe | |
parent | 21537636cd8318cf5a720211619ad3c3023b52e9 (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/pe')
-rw-r--r-- | src/format/pe/pe-int.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/format/pe/pe-int.c b/src/format/pe/pe-int.c index 8814ea0..bcffe62 100644 --- a/src/format/pe/pe-int.c +++ b/src/format/pe/pe-int.c @@ -53,8 +53,8 @@ bool read_dos_image_header(const GPeFormat *format, off_t *pos, image_dos_header off_t length; /* Taille totale du contenu */ size_t i; /* Boucle de parcours */ - content = G_BIN_FORMAT(format)->content; - length = G_BIN_FORMAT(format)->length; + content = NULL; //G_BIN_FORMAT(format)->content; + length = 0; //G_BIN_FORMAT(format)->length; result = read_u16(&header->e_magic, content, pos, length, SRE_LITTLE); result &= read_u16(&header->e_cblp, content, pos, length, SRE_LITTLE); @@ -107,8 +107,8 @@ bool read_pe_file_header(const GPeFormat *format, off_t *pos, image_file_header const bin_t *content; /* Contenu binaire à lire */ off_t length; /* Taille totale du contenu */ - content = G_BIN_FORMAT(format)->content; - length = G_BIN_FORMAT(format)->length; + content = NULL; //G_BIN_FORMAT(format)->content; + length = 0; //G_BIN_FORMAT(format)->length; result = read_u16(&header->machine, content, pos, length, SRE_LITTLE); result &= read_u16(&header->number_of_sections, content, pos, length, SRE_LITTLE); @@ -144,8 +144,8 @@ bool read_pe_optional_header(const GPeFormat *format, off_t *pos, image_optional off_t length; /* Taille totale du contenu */ uint32_t i; /* Boucle de parcours */ - content = G_BIN_FORMAT(format)->content; - length = G_BIN_FORMAT(format)->length; + content = NULL; //G_BIN_FORMAT(format)->content; + length = 0; //G_BIN_FORMAT(format)->length; result = read_u16(&header->magic, content, pos, length, SRE_LITTLE); result &= read_u8(&header->major_linker_version, content, pos, length, SRE_LITTLE); @@ -209,8 +209,8 @@ bool read_pe_nt_header(const GPeFormat *format, off_t *pos, image_nt_headers *he const bin_t *content; /* Contenu binaire à lire */ off_t length; /* Taille totale du contenu */ - content = G_BIN_FORMAT(format)->content; - length = G_BIN_FORMAT(format)->length; + content = NULL; //G_BIN_FORMAT(format)->content; + length = 0; //G_BIN_FORMAT(format)->length; result = read_u32(&header->signature, content, pos, length, SRE_LITTLE); @@ -243,8 +243,8 @@ bool read_pe_image_section_header(const GPeFormat *format, off_t *pos, image_sec off_t length; /* Taille totale du contenu */ size_t i; /* Boucle de parcours */ - content = G_BIN_FORMAT(format)->content; - length = G_BIN_FORMAT(format)->length; + content = NULL; //G_BIN_FORMAT(format)->content; + length = 0; //G_BIN_FORMAT(format)->length; result = true; @@ -287,8 +287,8 @@ bool read_pe_image_import_descriptor(const GPeFormat *format, off_t *pos, image_ const bin_t *content; /* Contenu binaire à lire */ off_t length; /* Taille totale du contenu */ - content = G_BIN_FORMAT(format)->content; - length = G_BIN_FORMAT(format)->length; + content = NULL; //G_BIN_FORMAT(format)->content; + length = 0; //G_BIN_FORMAT(format)->length; result = read_u32(&desc->original_first_thunk, content, pos, length, SRE_LITTLE); result &= read_u32(&desc->time_date_stamp, content, pos, length, SRE_LITTLE); @@ -324,8 +324,8 @@ bool read_pe_image_import_by_name(const GPeFormat *format, off_t *pos, image_imp off_t new_pos; /* Nouvelle tête de lecture */ size_t i; /* Boucle de parcours */ - content = G_BIN_FORMAT(format)->content; - length = G_BIN_FORMAT(format)->length; + content = NULL; //G_BIN_FORMAT(format)->content; + length = 0; //G_BIN_FORMAT(format)->length; result = read_u32(&link, content, pos, length, SRE_LITTLE); |