Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/gnu/dist/toolchain/ld/emultempl Pull up revisions 1.2-1...
details: https://anonhg.NetBSD.org/src/rev/a82e3ad15889
branches: netbsd-1-6
changeset: 529717:a82e3ad15889
user: he <he%NetBSD.org@localhost>
date: Sun Dec 08 13:36:29 2002 +0000
description:
Pull up revisions 1.2-1.3 (requested by thorpej in ticket #1028):
Use basename() in a safe way.
Diff applied is actually 1.1.1.4 -> 1.3.
diffstat:
gnu/dist/toolchain/ld/emultempl/elf32.em | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r faa5a9eed136 -r a82e3ad15889 gnu/dist/toolchain/ld/emultempl/elf32.em
--- a/gnu/dist/toolchain/ld/emultempl/elf32.em Sun Dec 08 10:21:17 2002 +0000
+++ b/gnu/dist/toolchain/ld/emultempl/elf32.em Sun Dec 08 13:36:29 2002 +0000
@@ -243,7 +243,7 @@
int force;
{
bfd *abfd;
- const char *soname;
+ char *soname;
abfd = bfd_openr (name, bfd_get_target (output_bfd));
if (abfd == NULL)
@@ -329,7 +329,7 @@
einfo ("%F%P:%B: bfd_stat failed: %E\n", abfd);
/* First strip off everything before the last '/'. */
- soname = basename (abfd->filename);
+ soname = xstrdup (basename (abfd->filename));
if (trace_file_tries)
info_msg (_("found %s at %s\n"), soname, name);
@@ -340,6 +340,7 @@
{
/* Return true to indicate that we found the file, even though
we aren't going to do anything with it. */
+ free (soname);
return true;
}
Home |
Main Index |
Thread Index |
Old Index