Code:  stub_charset ()
 {
  locale = get_locale_var ("LC_CTYPE");
 
   locale = get_locale_var ("LC_CTYPE");
   if (locale == 0 || *locale == 0)
    return "ASCII";
   s = strrchr (locale, '.');
   if (s)
     {
      t = strchr (s, '@');
       if (t)
 	*t = 0;
      return ++s;
     }
  else if (STREQ (locale, "UTF-8"))
    return "UTF-8";
  else
    return "ASCII";
 }

Vulnerability Type: Exec Code Overflow
CWE ID: CWE-119
Summary: A heap-based buffer overflow exists in GNU Bash before 4.3 when wide characters, not supported by the current locale set in the LC_CTYPE environment variable, are printed through the echo built-in function. A local attacker, who can provide data to print through the "echo -e" built-in function, may use this flaw to crash a script or execute code with the privileges of the bash process. This occurs because ansicstr() in lib/sh/strtrans.c mishandles u32cconv().
Commit Message: 