summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2005-10-21 09:47:09 +0000
committerJeff Trawick <trawick@apache.org>2005-10-21 09:47:09 +0000
commit35d9de339bd2ac0c4de70fd8f57f3f01c27b6431 (patch)
tree30887368b4bb5276a827bfe7b625fcbf78ea6ce5
parent61ca52a6d461f1e637158c47de75f184d30019c2 (diff)
downloadapr-35d9de339bd2ac0c4de70fd8f57f3f01c27b6431.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: https://svn.apache.org/repos/asf/apr/apr/trunk@327141 13f79535-47bb-0310-9956-ffa450edef68
-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;