You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/03/20 14:37:55 UTC

svn commit: r1302885 - in /subversion/branches/1.6.x: ./ STATUS subversion/libsvn_ra_svn/cyrus_auth.c

Author: stsp
Date: Tue Mar 20 13:37:55 2012
New Revision: 1302885

URL: http://svn.apache.org/viewvc?rev=1302885&view=rev
Log:
On the 1.6.x branch, merge r1166555 and r1166678 from trunk.

 * r1166555, r1166678
   Fix a crash in ra_svn SASL authentication.
   Justification:
     See http://svn.haxx.se/dev/archive-2011-09/0182.shtml
   Votes:
     +1: stsp, philip, rhuijben

Modified:
    subversion/branches/1.6.x/   (props changed)
    subversion/branches/1.6.x/STATUS
    subversion/branches/1.6.x/subversion/libsvn_ra_svn/cyrus_auth.c

Propchange: subversion/branches/1.6.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1166555,1166678

Modified: subversion/branches/1.6.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/STATUS?rev=1302885&r1=1302884&r2=1302885&view=diff
==============================================================================
--- subversion/branches/1.6.x/STATUS (original)
+++ subversion/branches/1.6.x/STATUS Tue Mar 20 13:37:55 2012
@@ -234,13 +234,6 @@ Approved changes:
    Votes:
      +1: julianfoad, stsp, rhuijben
 
- * r1166555, r1166678
-   Fix a crash in ra_svn SASL authentication.
-   Justification:
-     See http://svn.haxx.se/dev/archive-2011-09/0182.shtml
-   Votes:
-     +1: stsp, philip, rhuijben
-
  * r1230212
    Fix for large files on 32-bit systems.
    Justification:

Modified: subversion/branches/1.6.x/subversion/libsvn_ra_svn/cyrus_auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/libsvn_ra_svn/cyrus_auth.c?rev=1302885&r1=1302884&r2=1302885&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/libsvn_ra_svn/cyrus_auth.c (original)
+++ subversion/branches/1.6.x/subversion/libsvn_ra_svn/cyrus_auth.c Tue Mar 20 13:37:55 2012
@@ -730,9 +730,7 @@ svn_ra_svn__do_cyrus_auth(svn_ra_svn__se
   const char *mechstring = "", *last_err = "", *realmstring;
   const char *local_addrport = NULL, *remote_addrport = NULL;
   svn_boolean_t success;
-  /* Reserve space for 3 callbacks (for the username, password and the
-     array terminator). */
-  sasl_callback_t callbacks[3];
+  sasl_callback_t *callbacks;
   cred_baton_t cred_baton;
   int i;
 
@@ -768,6 +766,13 @@ svn_ra_svn__do_cyrus_auth(svn_ra_svn__se
   cred_baton.realmstring = realmstring;
   cred_baton.pool = pool;
 
+  /* Reserve space for 3 callbacks (for the username, password and the
+     array terminator).  These structures must persist until the
+     disposal of the SASL context at pool cleanup, however the
+     callback functions will not be invoked outside this function so
+     other structures can have a shorter lifetime. */
+  callbacks = apr_palloc(sess->conn->pool, sizeof(*callbacks) * 3);
+
   /* Initialize the callbacks array. */
 
   /* The username callback. */