From: Ulrich Drepper Date: Mon, 21 Aug 2000 21:01:52 +0000 (+0000) Subject: (catopen): Filter out env_var values with / if necessary. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=566b0f7b876748e3f477ae2db267cf99b4f14766;p=thirdparty%2Fglibc.git (catopen): Filter out env_var values with / if necessary. --- diff --git a/catgets/catgets.c b/catgets/catgets.c index 86ff0ff831d..f49ead9fcee 100644 --- a/catgets/catgets.c +++ b/catgets/catgets.c @@ -50,7 +50,9 @@ catopen (const char *cat_name, int flag) /* Use the LANG environment variable. */ env_var = getenv ("LANG"); - if (env_var == NULL) + + if (env_var == NULL || *env_var == '\0' + || (__libc_enable_secure && strchr (env_var, '/') != NULL)) env_var = "C"; env_var_len = strlen (env_var) + 1;