summaryrefslogtreecommitdiff
path: root/src/format
diff options
context:
space:
mode:
Diffstat (limited to 'src/format')
-rw-r--r--src/format/dex/dex-int.c4
-rwxr-xr-xsrc/format/dex/dex.c2
-rw-r--r--src/format/elf/elf-int.c2
-rw-r--r--src/format/elf/elf.c2
-rw-r--r--src/format/elf/strings.c2
-rw-r--r--src/format/format.h2
-rwxr-xr-xsrc/format/java/java.c2
-rw-r--r--src/format/pe/pe-int.c8
8 files changed, 12 insertions, 12 deletions
diff --git a/src/format/dex/dex-int.c b/src/format/dex/dex-int.c
index 914f491..5ce0675 100644
--- a/src/format/dex/dex-int.c
+++ b/src/format/dex/dex-int.c
@@ -64,12 +64,12 @@ bool read_dex_header(const GDexFormat *format, off_t *pos, dex_header *header)
length = 0; //G_BIN_FORMAT(format)->length;
for (i = 0; i < DEX_FILE_MAGIC_LEN && result; i++)
- result = read_u8(&header->magic[i], content, pos, length, SRE_LITTLE);
+ result = read_u8(&header->magic[i], content, pos, length);
result &= read_u32(&header->checksum, content, pos, length, SRE_LITTLE);
for (i = 0; i < 20 && result; i++)
- result = read_u8(&header->signature[i], content, pos, length, SRE_LITTLE);
+ result = read_u8(&header->signature[i], content, pos, length);
result &= read_u32(&header->file_size, content, pos, length, SRE_LITTLE);
result &= read_u32(&header->header_size, content, pos, length, SRE_LITTLE);
diff --git a/src/format/dex/dex.c b/src/format/dex/dex.c
index eb78f79..0015357 100755
--- a/src/format/dex/dex.c
+++ b/src/format/dex/dex.c
@@ -85,7 +85,7 @@ bool dex_is_matching(GBinContent *content)
init_vmpa(&addr, 0, VMPA_NO_VIRTUAL);
- result = g_binary_content_get_raw(content, &addr, DEX_FILE_MAGIC_LEN, (bin_t *)magic);
+ result = g_binary_content_read_raw(content, &addr, DEX_FILE_MAGIC_LEN, (bin_t *)magic);
result &= (memcmp(magic, DEX_FILE_MAGIC, DEX_FILE_MAGIC_LEN) == 0);
diff --git a/src/format/elf/elf-int.c b/src/format/elf/elf-int.c
index 3e70932..2d6da8b 100644
--- a/src/format/elf/elf-int.c
+++ b/src/format/elf/elf-int.c
@@ -53,7 +53,7 @@ bool read_elf_header(GElfFormat *format, elf_header *header, bool *is_32b, Sourc
init_vmpa(&pos, 0, VMPA_NO_VIRTUAL);
- result = g_binary_content_get_raw(content, &pos, EI_NIDENT, (bin_t *)header->hdr32.e_ident);
+ result = g_binary_content_read_raw(content, &pos, EI_NIDENT, (bin_t *)header->hdr32.e_ident);
/* Détermination de l'espace d'adressage */
if (result)
diff --git a/src/format/elf/elf.c b/src/format/elf/elf.c
index 7f3af9f..5c81b2f 100644
--- a/src/format/elf/elf.c
+++ b/src/format/elf/elf.c
@@ -102,7 +102,7 @@ const char *elf_is_matching(GBinContent *content, GExeFormat *parent)
init_vmpa(&addr, 0, VMPA_NO_VIRTUAL);
- status = g_binary_content_get_raw(content, &addr, 4, (bin_t *)magic);
+ status = g_binary_content_read_raw(content, &addr, 4, (bin_t *)magic);
status &= (memcmp(magic, "\x7f\x45\x4c\x46" /* .ELF */, 4) == 0);
diff --git a/src/format/elf/strings.c b/src/format/elf/strings.c
index 4d8a32e..948f384 100644
--- a/src/format/elf/strings.c
+++ b/src/format/elf/strings.c
@@ -173,7 +173,7 @@ bool parse_elf_string_data(GElfFormat *format, phys_t start, phys_t size, virt_t
init_vmpa(&pos, start, address);
- if (!g_binary_content_get_raw(content, &pos, size, (bin_t *)data))
+ if (!g_binary_content_read_raw(content, &pos, size, (bin_t *)data))
goto pesd_error;
/* Boucle de parcours */
diff --git a/src/format/format.h b/src/format/format.h
index 9fe23f4..8c06522 100644
--- a/src/format/format.h
+++ b/src/format/format.h
@@ -31,9 +31,9 @@
#include "symbol.h"
+#include "../analysis/content.h"
#include "../analysis/routine.h"
#include "../arch/context.h"
-#include "../glibext/gbincontent.h"
diff --git a/src/format/java/java.c b/src/format/java/java.c
index 4929b52..39403c4 100755
--- a/src/format/java/java.c
+++ b/src/format/java/java.c
@@ -76,7 +76,7 @@ bool java_is_matching(GBinContent *content)
init_vmpa(&addr, 0, VMPA_NO_VIRTUAL);
- result = g_binary_content_get_raw(content, &addr, 4, (bin_t *)magic);
+ result = g_binary_content_read_raw(content, &addr, 4, (bin_t *)magic);
result &= (memcmp(magic, "\xca\xfe\xba\xbe", 4) == 0);
diff --git a/src/format/pe/pe-int.c b/src/format/pe/pe-int.c
index bcffe62..e73b720 100644
--- a/src/format/pe/pe-int.c
+++ b/src/format/pe/pe-int.c
@@ -148,8 +148,8 @@ bool read_pe_optional_header(const GPeFormat *format, off_t *pos, image_optional
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);
- result &= read_u8(&header->minor_linker_version, content, pos, length, SRE_LITTLE);
+ result &= read_u8(&header->major_linker_version, content, pos, length);
+ result &= read_u8(&header->minor_linker_version, content, pos, length);
result &= read_u32(&header->size_of_code, content, pos, length, SRE_LITTLE);
result &= read_u32(&header->size_of_initialized_data, content, pos, length, SRE_LITTLE);
result &= read_u32(&header->size_of_uninitialized_data, content, pos, length, SRE_LITTLE);
@@ -249,7 +249,7 @@ bool read_pe_image_section_header(const GPeFormat *format, off_t *pos, image_sec
result = true;
for (i = 0; i < IMAGE_SIZEOF_SHORT_NAME && result; i++)
- result = read_u8((uint8_t *)&section->name[i], content, pos, length, SRE_LITTLE);
+ result = read_u8((uint8_t *)&section->name[i], content, pos, length);
result &= read_u32(&section->misc.physical_address, content, pos, length, SRE_LITTLE);
@@ -342,7 +342,7 @@ bool read_pe_image_import_by_name(const GPeFormat *format, off_t *pos, image_imp
for (i = 0; result; i++)
{
- result = read_u8((uint8_t *)&import->name[i], content, &new_pos, length, SRE_LITTLE);
+ result = read_u8((uint8_t *)&import->name[i], content, &new_pos, length);
if (import->name[i] == '\0')
break;