apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r327141 - /apr/apr/trunk/strings/apr_cpystrn.c
Date Fri, 21 Oct 2005 09:47:15 GMT
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;
 



Mime
View raw message