about summary refs log tree commit diff
path: root/locale/programs/ld-ctype.c
diff options
context:
space:
mode:
Diffstat (limited to 'locale/programs/ld-ctype.c')
-rw-r--r--locale/programs/ld-ctype.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
index 0a5e4eebf1..f2ad46f092 100644
--- a/locale/programs/ld-ctype.c
+++ b/locale/programs/ld-ctype.c
@@ -492,8 +492,9 @@ ctype_output (struct localedef_t *locale, struct charset_t *charset,
 	    else
 	      {
 		iov[2 + elem + offset].iov_base = alloca ((total + 3) & ~3);
-		memcpy (iov[2 + elem + offset].iov_base, ctype->codeset_name,
-			total);
+		memset (mempcpy (iov[2 + elem + offset].iov_base,
+				 ctype->codeset_name, total),
+			'\0', 4 - (total & 3));
 		total = (total + 3) & ~3;
 	      }
 	    iov[2 + elem + offset].iov_len = total;