summaryrefslogtreecommitdiff
path: root/src/format
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2009-10-08 00:09:58 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2009-10-08 00:09:58 (GMT)
commitba83d7ea7338945c817bc28aa94a41947f2472a1 (patch)
treec3a36810523872ba84666dc94bb33315c7d456c8 /src/format
parentdaa0084325d4e748f334a223e1cd3800120e6055 (diff)
Fixed an integer overflow in symbol name index.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@129 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format')
-rw-r--r--src/format/elf/elf_def.h2
-rw-r--r--src/format/elf/section.c2
-rw-r--r--src/format/elf/section.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/format/elf/elf_def.h b/src/format/elf/elf_def.h
index 2e5489b..d063dcf 100644
--- a/src/format/elf/elf_def.h
+++ b/src/format/elf/elf_def.h
@@ -203,7 +203,7 @@ typedef struct _elf64_shdr
typedef union _elf_shdr
{
elf32_shdr shdr32; /* Version 32 bits */
- elf64_shdr shdr64; /* Version 32 bits */
+ elf64_shdr shdr64; /* Version 64 bits */
} elf_shdr;
diff --git a/src/format/elf/section.c b/src/format/elf/section.c
index 940acdf..e019648 100644
--- a/src/format/elf/section.c
+++ b/src/format/elf/section.c
@@ -247,7 +247,7 @@ bool find_elf_section_content_by_name(const GElfFormat *format, const char *name
* *
******************************************************************************/
-const char *extract_name_from_elf_string_section(const GElfFormat *format, const elf_shdr *section, uint16_t index)
+const char *extract_name_from_elf_string_section(const GElfFormat *format, const elf_shdr *section, off_t index)
{
const char *result; /* Nom trouvé à renvoyer */
const bin_t *content; /* Contenu binaire à lire */
diff --git a/src/format/elf/section.h b/src/format/elf/section.h
index 944fd7c..bc952a4 100644
--- a/src/format/elf/section.h
+++ b/src/format/elf/section.h
@@ -49,7 +49,7 @@ void get_elf_section_content(const GElfFormat *, const elf_shdr *, off_t *, off_
bool find_elf_section_content_by_name(const GElfFormat *, const char *, off_t *, off_t *, vmpa_t *);
/* Identifie une chaîne de caractères dans une section adéquate. */
-const char *extract_name_from_elf_string_section(const GElfFormat *, const elf_shdr *, uint16_t);
+const char *extract_name_from_elf_string_section(const GElfFormat *, const elf_shdr *, off_t);