* environ.cc (strbrk): Properly deal with environment variable sans quote.
This commit is contained in:
parent
16be32590d
commit
423de1c03d
|
@ -1,3 +1,8 @@
|
|||
2014-02-09 Christopher Faylor <me.cygwin2014@cgf.cx>
|
||||
|
||||
* environ.cc (strbrk): Properly deal with environment variable sans
|
||||
quote.
|
||||
|
||||
2014-02-09 Christopher Faylor <me.cygwin2014@cgf.cx>
|
||||
|
||||
* environ.cc (strbrk): New function.
|
||||
|
|
|
@ -148,10 +148,10 @@ strbrk(char *&buf)
|
|||
char *tok = buf;
|
||||
char *sep = buf + strcspn(buf, " \t");
|
||||
char *quotestart = strchr(buf, '"');
|
||||
if (quotestart > sep)
|
||||
if (!quotestart || quotestart > sep)
|
||||
{
|
||||
buf = sep + !!*sep; /* Don't point beyond EOS */
|
||||
quotestart = NULL;
|
||||
buf = sep + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue