diff options
Diffstat (limited to 'lib/libc/locale/setrunelocale.c')
-rw-r--r-- | lib/libc/locale/setrunelocale.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libc/locale/setrunelocale.c b/lib/libc/locale/setrunelocale.c index 228efe29..cf68a43 100644 --- a/lib/libc/locale/setrunelocale.c +++ b/lib/libc/locale/setrunelocale.c @@ -85,10 +85,8 @@ _xpg4_setrunelocale(encoding) if (!_PathLocale) return(EFAULT); - (void) strcpy(name, _PathLocale); - (void) strcat(name, "/"); - (void) strcat(name, encoding); - (void) strcat(name, "/LC_CTYPE"); + (void) snprintf(name, sizeof name, "%s/%s/LC_CTYPE", + _PathLocale, encoding); if ((fp = fopen(name, "r")) == NULL) return(ENOENT); |