summary refs log tree commit diff
path: root/intl
diff options
context:
space:
mode:
Diffstat (limited to 'intl')
-rw-r--r--intl/localealias.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/intl/localealias.c b/intl/localealias.c
index 716657c844..fc3bc1238b 100644
--- a/intl/localealias.c
+++ b/intl/localealias.c
@@ -150,9 +150,11 @@ read_alias_file (fname, fname_len)
   FILE *fp;
   char *full_fname;
   size_t added;
+  static const char aliasfile[] = "/locale.alias";
 
-  full_fname = (char *) alloca (fname_len + sizeof ("/locale.alias"));
-  sprintf (full_fname, "%.*s/locale.alias", fname_len, fname);
+  full_fname = (char *) alloca (fname_len + sizeof aliasfile);
+  memcpy (full_fname, fname, fname_len);
+  memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
 
   fp = fopen (full_fname, "r");
   if (fp == NULL)