summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2002-08-03 10:23:06 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2002-08-03 10:23:06 +0000
commit256ddd59999afbdb56a84625324402a9fef4147c (patch)
treec6eae7253ce8ebabd7414ca2511b2208163354c3
parent5568219d1555ea610b08d4a2993fcf187797201a (diff)
Notes
-rw-r--r--lib/libc/locale/setrunelocale.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libc/locale/setrunelocale.c b/lib/libc/locale/setrunelocale.c
index e9cee2ea16ce..4d3cf0ed075e 100644
--- a/lib/libc/locale/setrunelocale.c
+++ b/lib/libc/locale/setrunelocale.c
@@ -61,7 +61,11 @@ setrunelocale(encoding)
char name[PATH_MAX];
_RuneLocale *rl;
- if (!encoding || strlen(encoding) > ENCODING_LEN)
+ if (!encoding || strlen(encoding) > ENCODING_LEN ||
+ (encoding[0] == '.' &&
+ (encoding[1] == '\0' ||
+ (encoding[1] == '.' && encoding[2] == '\0'))) ||
+ strchr(encoding, '/') != NULL)
return (EINVAL);
/*