mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 10:50:07 +00:00
(__argz_create): Correctly calculate length.
This commit is contained in:
parent
0efef8fcee
commit
de3bf9b1a5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user