mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-06 14:10:30 +08:00
(catopen): Correctly determine length of string in NLSPATH environment
variable.
This commit is contained in:
parent
ae1b66e6c8
commit
b0486b1cbd
@ -87,7 +87,7 @@ catopen (const char *cat_name, int flag)
|
||||
if (nlspath != NULL && *nlspath != '\0')
|
||||
{
|
||||
/* Append the system dependent directory. */
|
||||
size_t len = strlen (nlspath + 1 + sizeof NLSPATH);
|
||||
size_t len = strlen (nlspath) + 1 + sizeof NLSPATH;
|
||||
char *tmp = alloca (len);
|
||||
|
||||
__stpcpy (__stpcpy (__stpcpy (tmp, nlspath), ":"), NLSPATH);
|
||||
|
Loading…
x
Reference in New Issue
Block a user