summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2005-10-21 09:47:09 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2005-10-21 09:47:09 +0000
commit14b443d774e331b235d23041114aaff7e931768e (patch)
tree30887368b4bb5276a827bfe7b625fcbf78ea6ce5 /strings
parente68ab37804308cc3326437034daaf56f328962d3 (diff)
downloadlibapr-14b443d774e331b235d23041114aaff7e931768e.tar.gz
apr_tokenize_to_argv(): Stop touching storage after the
end of the input string. (Purify reports this problem when using an Apache piped logger.) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@327141 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'strings')
-rw-r--r--strings/apr_cpystrn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/strings/apr_cpystrn.c b/strings/apr_cpystrn.c
index 9edba846a..80db81107 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;