summaryrefslogtreecommitdiff
path: root/string
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-05-22 22:21:46 +0000
committerMiles Bader <miles@gnu.org>1996-05-22 22:21:46 +0000
commita0777f516352fdfe7a46892c0e476b742dda368c (patch)
tree296c63d98756799bdca3240763b0bc749303bd92 /string
parentde3bf9b1a569f80fa7668aab472b44fe105ec5bf (diff)
downloadglibc-a0777f516352fdfe7a46892c0e476b742dda368c.tar.gz
(__argz_extract): Add terminating 0 entry.
Diffstat (limited to 'string')
-rw-r--r--string/argz-extract.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/string/argz-extract.c b/string/argz-extract.c
index 49a1426d73..99f6cdf97a 100644
--- a/string/argz-extract.c
+++ b/string/argz-extract.c
@@ -20,8 +20,8 @@
#include <argz.h>
-/* Puts pointers to each string in ARGZ into ARGV, which must be large enough
- to hold them all. */
+/* Puts pointers to each string in ARGZ, plus a terminating 0 element, into
+ ARGV, which must be large enough to hold them all. */
void
__argz_extract (char *argz, size_t len, char **argv)
{
@@ -32,5 +32,6 @@ __argz_extract (char *argz, size_t len, char **argv)
argz += part_len + 1;
len -= part_len + 1;
}
+ *argv = 0;
}
weak_alias (__argz_extract, argz_extract)