aboutsummaryrefslogtreecommitdiff
path: root/binutils/elfcomm.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2014-12-01 11:19:39 +0000
committerNick Clifton <nickc@redhat.com>2014-12-01 11:19:39 +0000
commit591f7597d447d8d038d6d8e24a706d1d5e32eba1 (patch)
treeb15865685398ad63e89487842d9b896a421c7105 /binutils/elfcomm.h
parent9e8cd6df3ca295986b2c295b6cfa5ceadd410bb4 (diff)
downloadgdb-591f7597d447d8d038d6d8e24a706d1d5e32eba1.zip
gdb-591f7597d447d8d038d6d8e24a706d1d5e32eba1.tar.gz
gdb-591f7597d447d8d038d6d8e24a706d1d5e32eba1.tar.bz2
Add checks for memory access violations exposed by fuzzed archives.
PR binutils/17531 * dwarf.c (process_cu_tu_index): Check for an out of range row index. * elfcomm.c (adjust_relative_path): Change name_len parameter to an unsigned long. Check for path length overflow. (process_archive_index_and_symbols): Check for invalid header size. (setup_archive): Add checks for invalid archives. (get_archive_member_name): Add range checks. * elfcomm.h (adjust_relative_path): Update prototyoe. * readelf.c (process_archive): Add range checks.
Diffstat (limited to 'binutils/elfcomm.h')
-rw-r--r--binutils/elfcomm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/binutils/elfcomm.h b/binutils/elfcomm.h
index f41a8ac..4fd2d6c 100644
--- a/binutils/elfcomm.h
+++ b/binutils/elfcomm.h
@@ -77,7 +77,7 @@ struct archive_info
};
/* Return the path name for a proxy entry in a thin archive. */
-extern char *adjust_relative_path (const char *, const char *, int);
+extern char *adjust_relative_path (const char *, const char *, unsigned long);
/* Read the symbol table and long-name table from an archive. */
extern int setup_archive (struct archive_info *, const char *, FILE *,