(catopen): Correctly determine length of string in NLSPATH environment

variable.
This commit is contained in:
Ulrich Drepper 1997-08-29 18:19:23 +00:00
parent ae1b66e6c8
commit b0486b1cbd

View File

@ -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);