diff options
author | iliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-03-11 04:18:07 +0000 |
---|---|---|
committer | iliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-03-11 04:18:07 +0000 |
commit | 72ca7d4dda2a76cd846a9308acfca7c454886345 (patch) | |
tree | d3c3a2105fe6a2f5108dc2b4beb3664c6a05a2d8 | |
parent | bf827edcad6618f101473fa1ddb4e639bba0d1e2 (diff) | |
download | ATCD-72ca7d4dda2a76cd846a9308acfca7c454886345.tar.gz |
ChangeLogTag: Tue Mar 11 04:08:21 UTC 2008 Iliyan Jeliazkov <iliyan@ociweb.com>
-rw-r--r-- | ACE/ChangeLog.iliyan-gestalt | 9 | ||||
-rw-r--r-- | ACE/ace/OS_NS_unistd.cpp | 8 |
2 files changed, 16 insertions, 1 deletions
diff --git a/ACE/ChangeLog.iliyan-gestalt b/ACE/ChangeLog.iliyan-gestalt index cce69f1248d..49ac0f3c804 100644 --- a/ACE/ChangeLog.iliyan-gestalt +++ b/ACE/ChangeLog.iliyan-gestalt @@ -1,3 +1,12 @@ +Tue Mar 11 04:08:21 UTC 2008 Iliyan Jeliazkov <iliyan@ociweb.com> + + * ace/OS_NS_unistd.cpp: + + ACE_OS::argv_to_string is limited in its choice of what to quote + when quoting is required. It must quote not only when the arg + contains a space, but also if it is an empty string or some other + common control characters. + Wed Mar 5 19:31:36 UTC 2008 Iliyan Jeliazkov <fi326c@ociweb.com> * ace/ARGV.h: diff --git a/ACE/ace/OS_NS_unistd.cpp b/ACE/ace/OS_NS_unistd.cpp index 4119469d787..d3373e4e1e8 100644 --- a/ACE/ace/OS_NS_unistd.cpp +++ b/ACE/ace/OS_NS_unistd.cpp @@ -99,8 +99,14 @@ ACE_OS::argv_to_string (int argc, } } #endif /* ACE_LACKS_ENV */ + // If must quote, we only do it if the arg contains spaces, or + // is empty. Perhaps a check for other c | ord(c) <= 32 is in + // order? if (quote_args - && ACE_OS::strchr (argv_p[i], ACE_TEXT (' ')) != 0) + && (ACE_OS::strchr (argv_p[i], ACE_TEXT (' ')) != 0 + || ACE_OS::strchr (argv_p[i], ACE_TEXT ('\t')) != 0 + || ACE_OS::strchr (argv_p[i], ACE_TEXT ('\n')) != 0 + || *argv_p[i] == 0)) { if (argv_p == argv) { |