Author: svn-role
Date: Sat Jul  6 04:00:09 2024
New Revision: 1918959

URL: http://svn.apache.org/viewvc?rev=1918959&view=rev
Log:
Merge the r1918138 group from trunk:

 * r1918138, r1918139
   Fix unbounded memory usage in propget and proplist --xml commands
   Justification:
     Follow SVN's iterpool conventions
   Votes:
     +1: hartmannathan, jamessan, rinrab

Modified:
    subversion/branches/1.14.x/   (props changed)
    subversion/branches/1.14.x/STATUS
    subversion/branches/1.14.x/subversion/svn/propget-cmd.c
    subversion/branches/1.14.x/subversion/svn/proplist-cmd.c

Propchange: subversion/branches/1.14.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1918138-1918139

Modified: subversion/branches/1.14.x/STATUS
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.14.x/STATUS?rev=1918959&r1=1918958&r2=1918959&view=diff
==============================================================================
--- subversion/branches/1.14.x/STATUS (original)
+++ subversion/branches/1.14.x/STATUS Sat Jul  6 04:00:09 2024
@@ -27,10 +27,3 @@ Veto-blocked changes:
 
 Approved changes:
 =================
-
- * r1918138, r1918139
-   Fix unbounded memory usage in propget and proplist --xml commands
-   Justification:
-     Follow SVN's iterpool conventions
-   Votes:
-     +1: hartmannathan, jamessan, rinrab

Modified: subversion/branches/1.14.x/subversion/svn/propget-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.14.x/subversion/svn/propget-cmd.c?rev=1918959&r1=1918958&r2=1918959&view=diff
==============================================================================
--- subversion/branches/1.14.x/subversion/svn/propget-cmd.c (original)
+++ subversion/branches/1.14.x/subversion/svn/propget-cmd.c Sat Jul  6 04:00:09 
2024
@@ -272,14 +272,18 @@ print_properties(svn_stream_t *out,
 
   if (inherited_props)
     {
-      svn_pool_clear(iterpool);
-
       for (i = 0; i < inherited_props->nelts; i++)
         {
-          svn_prop_inherited_item_t *iprop =
-            APR_ARRAY_IDX(inherited_props, i, svn_prop_inherited_item_t *);
-          svn_string_t *propval = apr_hash_this_val(apr_hash_first(pool,
-                                                          iprop->prop_hash));
+          svn_prop_inherited_item_t *iprop;
+          svn_string_t *propval;
+
+          svn_pool_clear(iterpool);
+
+          iprop = APR_ARRAY_IDX(inherited_props, i,
+                                svn_prop_inherited_item_t *);
+          propval = apr_hash_this_val(apr_hash_first(iterpool,
+                                                     iprop->prop_hash));
+
           SVN_ERR(print_single_prop(propval, target_abspath_or_url,
                                     iprop->path_or_url,
                                     path_prefix, out, pname,

Modified: subversion/branches/1.14.x/subversion/svn/proplist-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.14.x/subversion/svn/proplist-cmd.c?rev=1918959&r1=1918958&r2=1918959&view=diff
==============================================================================
--- subversion/branches/1.14.x/subversion/svn/proplist-cmd.c (original)
+++ subversion/branches/1.14.x/subversion/svn/proplist-cmd.c Sat Jul  6 
04:00:09 2024
@@ -75,6 +75,8 @@ proplist_receiver_xml(void *baton,
           svn_prop_inherited_item_t *iprop =
             APR_ARRAY_IDX(inherited_props, i, svn_prop_inherited_item_t *);
 
+          svn_pool_clear(iterpool);
+
           sb = NULL;
 
           if (svn_path_is_url(iprop->path_or_url))


Reply via email to