diff options
author | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2005-10-22 13:42:08 +0000 |
---|---|---|
committer | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2005-10-22 13:42:08 +0000 |
commit | 995c190517fa67c2919fb5c5819fce7aea93ffea (patch) | |
tree | 2945a12d4471fa769cba8d3bc64d75e1387fdbc8 | |
parent | 6ae9d553debed7196e53a5ffe3b4883f6647f75e (diff) | |
download | libapr-995c190517fa67c2919fb5c5819fce7aea93ffea.tar.gz |
merge from trunk:
apr_tokenize_to_argv(): Stop touching storage after the
end of the input string.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@327661 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | strings/apr_cpystrn.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/strings/apr_cpystrn.c b/strings/apr_cpystrn.c index c57a0ec04..501cfe684 100644 --- a/strings/apr_cpystrn.c +++ b/strings/apr_cpystrn.c @@ -169,6 +169,7 @@ APR_DECLARE(apr_status_t) apr_tokenize_to_argv(const char *arg_str, /* determine first argument */ for (argnum = 0; argnum < (numargs-1); argnum++) { + SKIP_WHITESPACE(cp); CHECK_QUOTATION(cp, isquoted); ct = cp; DETERMINE_NEXTSTRING(cp, isquoted); @@ -177,7 +178,6 @@ APR_DECLARE(apr_status_t) apr_tokenize_to_argv(const char *arg_str, apr_cpystrn((*argv_out)[argnum], ct, cp - ct); cleaned = dirty = (*argv_out)[argnum]; REMOVE_ESCAPE_CHARS(cleaned, dirty, escaped); - SKIP_WHITESPACE(cp); } (*argv_out)[argnum] = NULL; |