apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r327660 - /apr/apr/branches/1.2.x/strings/apr_cpystrn.c
Date Sat, 22 Oct 2005 13:40:23 GMT
Author: trawick
Date: Sat Oct 22 06:40:20 2005
New Revision: 327660

URL: http://svn.apache.org/viewcvs?rev=327660&view=rev
Log:
merge from trunk:

  apr_tokenize_to_argv(): Stop touching storage after the
  end of the input string.

Modified:
    apr/apr/branches/1.2.x/strings/apr_cpystrn.c

Modified: apr/apr/branches/1.2.x/strings/apr_cpystrn.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.2.x/strings/apr_cpystrn.c?rev=327660&r1=327659&r2=327660&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/strings/apr_cpystrn.c (original)
+++ apr/apr/branches/1.2.x/strings/apr_cpystrn.c Sat Oct 22 06:40:20 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