about summary refs log tree commit diff
path: root/elf/dl-profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-profile.c')
-rw-r--r--elf/dl-profile.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/elf/dl-profile.c b/elf/dl-profile.c
index 19d1865c25..05b5c28fcb 100644
--- a/elf/dl-profile.c
+++ b/elf/dl-profile.c
@@ -260,7 +260,11 @@ _dl_start_profile (struct link_map *map, const char *output_dir)
   *(int32_t *) hist_hdr.hist_size = kcountsize / sizeof (HISTCOUNTER);
   *(int32_t *) hist_hdr.prof_rate = __profile_frequency ();
   if (sizeof (hist_hdr.dimen) >= sizeof ("seconds"))
-    memcpy (hist_hdr.dimen, "seconds", sizeof ("seconds"));
+    {
+      memcpy (hist_hdr.dimen, "seconds", sizeof ("seconds"));
+      memset (hist_hdr.dimen + sizeof ("seconds"), '\0',
+	      sizeof (hist_hdr.dimen) - sizeof ("seconds"));
+    }
   else
     strncpy (hist_hdr.dimen, "seconds", sizeof (hist_hdr.dimen));
   hist_hdr.dimen_abbrev = 's';