Re: argz_stringify
Neal H Walfield <neal@gnu.org> writes:
> char test[] = "a\0b\0c\0d\0e".
> [...]
>
> This works great, (ie when the last character is indeed a null). However, if
> it happens that the last character is not a null, for example:
>
> argz_stringify(test, 9, ' ');
This never was intended to be happening. The values to be passed to
argz_stringify are supposed to come from other argz_* functions and
those are always counting in the trailing NUL byte of the last
element. But since it's easy to do I've aptched the argz_stringify
code in glibc to allow this case as well. It might be useful for some
purposes (like stringifying only parts of an argz value).
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------
Reply to: