about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-load.c2
-rw-r--r--elf/dl-version.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 600f5f9fe9..f42cb61ea3 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -419,7 +419,7 @@ fillin_rpath (char *rpath, struct r_search_path_elem **result, const char *sep,
 
 	  dirp->dirname = ((char *) dirp + sizeof (*dirp)
 			   + ncapstr * sizeof (enum r_dir_status));
-	  memcpy ((char *) dirp->dirname, cp, len + 1);
+	  *((char *) __mempcpy ((char *) dirp->dirname, cp, len)) = '\0';
 	  dirp->dirnamelen = len;
 
 	  if (len > max_dirnamelen)
diff --git a/elf/dl-version.c b/elf/dl-version.c
index bb0fc71e9d..1ae49587f4 100644
--- a/elf/dl-version.c
+++ b/elf/dl-version.c
@@ -95,7 +95,7 @@ match_symbol (const char *name, ElfW(Word) hash, const char *string,
 	 only print a message if verbose output is requested.  */
       if (verbose)
 	/* XXX We cannot translate the messages.  */
-	_dl_signal_cerror (0, map->l_name,
+	_dl_signal_cerror (0, map->l_name[0] ? map->l_name : _dl_argv[0],
 			   make_string ("\
 no version information available (required by ",
 					name, ")"));