httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: httpd-2.0/modules/ssl ssl_engine_init.c
Date Thu, 28 Feb 2002 04:59:07 GMT
dougm       02/02/27 20:59:07

  Modified:    modules/ssl ssl_engine_init.c
  Log:
  plug leak in ssl_init_FindCAList() where return value of
  X509_NAME_oneline() used for trace logging was not freed.
  now passes in a static buffer so no buffer is malloced.
  
  Revision  Changes    Path
  1.37      +2 -1      httpd-2.0/modules/ssl/ssl_engine_init.c
  
  Index: ssl_engine_init.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_init.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- ssl_engine_init.c	28 Feb 2002 04:35:29 -0000	1.36
  +++ ssl_engine_init.c	28 Feb 2002 04:59:07 -0000	1.37
  @@ -856,11 +856,12 @@
       sk = (STACK_OF(X509_NAME) *)SSL_load_client_CA_file(file);
   
       for (n = 0; sk != NULL && n < sk_X509_NAME_num(sk); n++) {
  +        char name_buf[256];
           X509_NAME *name = sk_X509_NAME_value(sk, n);
   
           ssl_log(s, SSL_LOG_TRACE,
                   "CA certificate: %s",
  -                X509_NAME_oneline(name, NULL, 0));
  +                X509_NAME_oneline(name, name_buf, sizeof(name_buf)));
   
           if (sk_X509_NAME_find(skCAList, name) < 0) {
               /* this will be freed when skCAList is */
  
  
  

Mime
View raw message