From 42ceaa809ff5e4b519d104173c23d0eb3548f7da Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Sun, 22 Dec 1996 15:48:06 +0000 Subject: [PATCH] Back out rev 1.5: the overflow condition is already handled elsewhere. --- lib/libc/locale/setrunelocale.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/libc/locale/setrunelocale.c b/lib/libc/locale/setrunelocale.c index cf68a437a97f..228efe2908a7 100644 --- a/lib/libc/locale/setrunelocale.c +++ b/lib/libc/locale/setrunelocale.c @@ -85,8 +85,10 @@ _xpg4_setrunelocale(encoding) if (!_PathLocale) return(EFAULT); - (void) snprintf(name, sizeof name, "%s/%s/LC_CTYPE", - _PathLocale, encoding); + (void) strcpy(name, _PathLocale); + (void) strcat(name, "/"); + (void) strcat(name, encoding); + (void) strcat(name, "/LC_CTYPE"); if ((fp = fopen(name, "r")) == NULL) return(ENOENT);