]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(catopen): Correctly determine length of string in NLSPATH environment
authorUlrich Drepper <drepper@redhat.com>
Fri, 29 Aug 1997 18:19:23 +0000 (18:19 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 29 Aug 1997 18:19:23 +0000 (18:19 +0000)
variable.

catgets/catgets.c

index 9228f970d62520b4b0fba78d62ee6f57ae241eb5..824d39eace6e9000f5341fc1987539620b98439e 100644 (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);