summary refs log tree commit diff
path: root/string/argz-create.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-05-22 22:20:51 +0000
committerMiles Bader <miles@gnu.org>1996-05-22 22:20:51 +0000
commitde3bf9b1a569f80fa7668aab472b44fe105ec5bf (patch)
treeaf9dbec43e3a3c3367097c91436032bd0bfbe56b /string/argz-create.c
parent0efef8fcee50e023049c6371c28ed5ecca365272 (diff)
downloadglibc-de3bf9b1a569f80fa7668aab472b44fe105ec5bf.tar.gz
glibc-de3bf9b1a569f80fa7668aab472b44fe105ec5bf.tar.xz
glibc-de3bf9b1a569f80fa7668aab472b44fe105ec5bf.zip
(__argz_create): Correctly calculate length.
Diffstat (limited to 'string/argz-create.c')
-rw-r--r--string/argz-create.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string/argz-create.c b/string/argz-create.c
index 2eea91162e..2be16b03e7 100644
--- a/string/argz-create.c
+++ b/string/argz-create.c
@@ -34,7 +34,7 @@ __argz_create (char *const argv[], char **argz, size_t *len)
   char *p;
 
   for (argc = 0; argv[argc] != NULL; ++argc)
-    tlen += strlen (argv[argc]);
+    tlen += strlen (argv[argc]) + 1;
 
   if (tlen == 0)
     *argz = NULL;