Bug 10699 - The argz create routines respond differently to empty strings
Summary: The argz create routines respond differently to empty strings
Status: RESOLVED WONTFIX
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.8
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-28 11:31 UTC by Haijen Lucien
Modified: 2014-07-01 06:46 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.
>