Bug 10699

Summary: The argz create routines respond differently to empty strings
Product: glibc Reporter: Haijen Lucien <lucien>
Component: libcAssignee: Ulrich Drepper <drepper.fsp>
Status: RESOLVED WONTFIX    
Severity: normal CC: glibc-bugs
Priority: P2 Flags: fweimer: security-
Version: 2.8   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description Haijen Lucien 2009-09-28 11:31:55 UTC
argv arguments can be empty strings by specifying '' or similar.
Those empty strings are part of argz as created by argz_create().
However argz strings created by argz_create_sep() does not allow empty
strings ; they are simply ignored thus producing a argz that cannnot be
used (after some processing) to a new argv array.
Comment 1 Ulrich Drepper 2009-10-29 23:52:26 UTC
The function is as it is.  If I would have known about this nuance back when I
wrote this function I most likely would have implemented as you expect it.  But
today it's too late.  There is code out there using thing function and those
programs might expect exactly the current behavior.  I cannot justify breaking
those programs.
Comment 2 Haijen Lucien 2009-10-30 15:48:41 UTC
Subject: Re:  The argz create routines respond differently
	to empty strings

Dear Sir

Thank you very much for making time to answer my "not really
a bug" report.
I fully agree with your justification for not modifying an
existing function. In the mean time I have written my own
version under a different name, which proved to be easy, plus
a whole set of other related functions that I now must test.

Again, many thanks from a retired but still busy C programmer.

Yours truly

L. Haijen
Antwerp, Belgium



On Thu, 2009-10-29 at 23:52 +0000, drepper at redhat dot com wrote:
> ------- Additional Comments From drepper at redhat dot com  2009-10-29 23:52 -------
> The function is as it is.  If I would have known about this nuance back when I
> wrote this function I most likely would have implemented as you expect it.  But
> today it's too late.  There is code out there using thing function and those
> programs might expect exactly the current behavior.  I cannot justify breaking
> those programs.
>