PR binutils/11742
* readelf.c (get_archive_member_name): Do not read beyond the end of the ar_name field.
This commit is contained in:
parent
51adeb0f12
commit
2e49a6d010
|
@ -1,3 +1,9 @@
|
||||||
|
2010-08-12 Michael Haubenwallner <haubi@gentoo.org>
|
||||||
|
|
||||||
|
PR binutils/11742
|
||||||
|
* readelf.c (get_archive_member_name): Do not read beyond the end
|
||||||
|
of the ar_name field.
|
||||||
|
|
||||||
2010-08-03 Tristan Gingold <gingold@adacore.com>
|
2010-08-03 Tristan Gingold <gingold@adacore.com>
|
||||||
|
|
||||||
* dwarf.c (display_debug_lines): Mark file argument unused.
|
* dwarf.c (display_debug_lines): Mark file argument unused.
|
||||||
|
|
|
@ -12556,7 +12556,8 @@ get_archive_member_name (struct archive_info * arch,
|
||||||
|
|
||||||
/* We have a normal (short) name. */
|
/* We have a normal (short) name. */
|
||||||
j = 0;
|
j = 0;
|
||||||
while ((arch->arhdr.ar_name[j] != '/') && (j < 16))
|
while ((arch->arhdr.ar_name[j] != '/')
|
||||||
|
&& (j < sizeof (arch->arhdr.ar_name) - 1))
|
||||||
j++;
|
j++;
|
||||||
arch->arhdr.ar_name[j] = '\0';
|
arch->arhdr.ar_name[j] = '\0';
|
||||||
return arch->arhdr.ar_name;
|
return arch->arhdr.ar_name;
|
||||||
|
|
Loading…
Reference in New Issue