From ba83d7ea7338945c817bc28aa94a41947f2472a1 Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Thu, 8 Oct 2009 00:09:58 +0000 Subject: Fixed an integer overflow in symbol name index. git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@129 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a --- ChangeLog | 9 +++++++++ src/format/elf/elf_def.h | 2 +- src/format/elf/section.c | 2 +- src/format/elf/section.h | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a22419d..efc2123 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +09-10-08 Cyrille Bagard + + * src/format/elf/elf_def.h: + Typo. + + * src/format/elf/section.c: + * src/format/elf/section.h: + Fix an integer overflow in symbol name index. + 09-10-07 Cyrille Bagard * src/arch/artificial.c: 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); -- cgit v0.11.2-87-g4458