httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bre...@apache.org
Subject svn commit: r1556428 - /httpd/httpd/trunk/modules/dav/main/util.c
Date Wed, 08 Jan 2014 02:40:38 GMT
Author: breser
Date: Wed Jan  8 02:40:38 2014
New Revision: 1556428

URL: http://svn.apache.org/r1556428
Log:
mod_dav: Keep track of length of cdata properly when removing leading spaces.

* modules/dav/main/util.c
  (dav_xml_get_cdata): reduce len variable when increasing cdata pointer.

Modified:
    httpd/httpd/trunk/modules/dav/main/util.c

Modified: httpd/httpd/trunk/modules/dav/main/util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/dav/main/util.c?rev=1556428&r1=1556427&r2=1556428&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/dav/main/util.c (original)
+++ httpd/httpd/trunk/modules/dav/main/util.c Wed Jan  8 02:40:38 2014
@@ -396,8 +396,10 @@ DAV_DECLARE(const char *) dav_xml_get_cd
 
     if (strip_white) {
         /* trim leading whitespace */
-        while (apr_isspace(*cdata))     /* assume: return false for '\0' */
+        while (apr_isspace(*cdata)) {     /* assume: return false for '\0' */
             ++cdata;
+            --len;
+        }
 
         /* trim trailing whitespace */
         while (len-- > 0 && apr_isspace(cdata[len]))



Mime
View raw message