You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2005/10/21 11:47:15 UTC

svn commit: r327141 - /apr/apr/trunk/strings/apr_cpystrn.c

Author: trawick
Date: Fri Oct 21 02:47:09 2005
New Revision: 327141

URL: http://svn.apache.org/viewcvs?rev=327141&view=rev
Log:
apr_tokenize_to_argv(): Stop touching storage after the
end of the input string.

(Purify reports this problem when using an Apache piped logger.)


Modified:
    apr/apr/trunk/strings/apr_cpystrn.c

Modified: apr/apr/trunk/strings/apr_cpystrn.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/strings/apr_cpystrn.c?rev=327141&r1=327140&r2=327141&view=diff
==============================================================================
--- apr/apr/trunk/strings/apr_cpystrn.c (original)
+++ apr/apr/trunk/strings/apr_cpystrn.c Fri Oct 21 02:47:09 2005
@@ -169,6 +169,7 @@
 
     /*  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_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;