subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bre...@apache.org
Subject svn commit: r1673062 - /subversion/trunk/subversion/libsvn_subr/x509parse.c
Date Sun, 12 Apr 2015 21:24:07 GMT
Author: breser
Date: Sun Apr 12 21:24:07 2015
New Revision: 1673062

URL: http://svn.apache.org/r1673062
Log:
Fix two error leaks in X.509 parser.

* subversion/libsvn_subr/x509parse.c
  (x509_get_ext): when handling subject alt names, properly return
    unexpected errors.
  (svn_x509_parse_cert): correctly add a child error that was inadvertently
    being discarded.

Modified:
    subversion/trunk/subversion/libsvn_subr/x509parse.c

Modified: subversion/trunk/subversion/libsvn_subr/x509parse.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/x509parse.c?rev=1673062&r1=1673061&r2=1673062&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/x509parse.c (original)
+++ subversion/trunk/subversion/libsvn_subr/x509parse.c Sun Apr 12 21:24:07 2015
@@ -685,6 +685,8 @@ x509_get_ext(apr_array_header_t *dnsname
                   *p += len;
                   continue;
                 }
+
+              return svn_error_trace(err);
             }
           else
             {
@@ -1052,7 +1054,7 @@ svn_x509_parse_cert(svn_x509_certinfo_t
    */
   err = asn1_get_tag(&p, end, &len, ASN1_CONSTRUCTED | ASN1_SEQUENCE);
   if (err)
-    return svn_error_create(SVN_ERR_X509_CERT_INVALID_FORMAT, NULL, NULL);
+    return svn_error_create(SVN_ERR_X509_CERT_INVALID_FORMAT, err, NULL);
 
   if (len != (end - p))
     {



Mime
View raw message