about summary refs log tree commit diff
path: root/elf/dl-lookup.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-07-17 03:34:06 +0000
committerRoland McGrath <roland@gnu.org>1996-07-17 03:34:06 +0000
commit184b7b466a34e1e7f3c4824109e66bc1e7fdfe23 (patch)
treeeb74d766a99559ded4faf8621b267cd9a03c6813 /elf/dl-lookup.c
parentf36f8dcf1cf07c66e9f7a3eba408e2b0af12d717 (diff)
downloadglibc-184b7b466a34e1e7f3c4824109e66bc1e7fdfe23.tar.gz
glibc-184b7b466a34e1e7f3c4824109e66bc1e7fdfe23.tar.xz
glibc-184b7b466a34e1e7f3c4824109e66bc1e7fdfe23.zip
* elf/dl-lookup.c (_dl_lookup_symbol): Avoid sizeof dynamic auto array
	because that is broken on alpha.
Diffstat (limited to 'elf/dl-lookup.c')
-rw-r--r--elf/dl-lookup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index a1a964fa6a..44f91fca7d 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -134,10 +134,10 @@ _dl_lookup_symbol (const char *undef_name, const ElfW(Sym) **ref,
     {
       /* We could find no value for a strong reference.  */
       const char msg[] = "undefined symbol: ";
-      char buf[sizeof msg + strlen (undef_name)];
+      const size_t len = strlen (undef_name);
+      char buf[sizeof msg + len];
       memcpy (buf, msg, sizeof msg - 1);
-      memcpy (&buf[sizeof msg - 1], undef_name,
-	      sizeof buf - sizeof msg + 1);
+      memcpy (&buf[sizeof msg - 1], undef_name, len + 1);
       _dl_signal_error (0, reference_name, buf);
     }