commit bash-20140815 snapshot

This commit is contained in:
Chet Ramey
2014-08-29 09:15:21 -04:00
parent e7fd1ab607
commit 581fe5894c
7 changed files with 89 additions and 14 deletions
+4 -2
View File
@@ -78,13 +78,15 @@ stub_charset ()
s = strrchr (locale, '.');
if (s)
{
strcpy (charsetbuf, s+1);
strncpy (charsetbuf, s+1, sizeof (charsetbuf) - 1);
charsetbuf[sizeof (charsetbuf) - 1] = '\0';
t = strchr (charsetbuf, '@');
if (t)
*t = 0;
return charsetbuf;
}
strcpy (charsetbuf, locale);
strncpy (charsetbuf, locale, sizeof (charsetbuf) - 1);
charsetbuf[sizeof (charsetbuf) - 1] = '\0';
return charsetbuf;
}
#endif