apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r1642159 - in /apr/apr/trunk: CHANGES encoding/apr_escape.c
Date Thu, 27 Nov 2014 14:26:03 GMT
Author: rpluem
Date: Thu Nov 27 14:26:03 2014
New Revision: 1642159

URL: http://svn.apache.org/r1642159
Log:
* Correctly calculate the size of the returned string and set the correct
  return value in case we actually escape the string.

PR: 57230
Submitted by: <aduryagin gmail.com>
Reviewed by: rpluem


Modified:
    apr/apr/trunk/CHANGES
    apr/apr/trunk/encoding/apr_escape.c

Modified: apr/apr/trunk/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/trunk/CHANGES?rev=1642159&r1=1642158&r2=1642159&view=diff
==============================================================================
--- apr/apr/trunk/CHANGES [utf-8] (original)
+++ apr/apr/trunk/CHANGES [utf-8] Thu Nov 27 14:26:03 2014
@@ -1,6 +1,10 @@
                                                      -*- coding: utf-8 -*-
 Changes for APR 2.0.0
 
+  *) apr_escape: Correctly calculate the size of the returned string in
+     apr_escape_path and set the correct return value in case we actually
+     escape the string. [<aduryagin gmail.com>] PR 57230.
+
   *) On z/OS, apr_sockaddr_info_get() with family == APR_UNSPEC was not 
      returning IPv4 addresses if any IPv6 addresses were returned. 
      [Eric Covener]

Modified: apr/apr/trunk/encoding/apr_escape.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/encoding/apr_escape.c?rev=1642159&r1=1642158&r2=1642159&view=diff
==============================================================================
--- apr/apr/trunk/encoding/apr_escape.c (original)
+++ apr/apr/trunk/encoding/apr_escape.c Thu Nov 27 14:26:03 2014
@@ -436,6 +436,8 @@ APR_DECLARE(apr_status_t) apr_escape_pat
         while ((c = *s) && slen) {
             if (TEST_CHAR(c, T_OS_ESCAPE_PATH)) {
                 d = c2x(c, '%', d);
+                size += 2;
+                found = 1;
             }
             else {
                 *d++ = c;



Mime
View raw message