httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r631254 - /httpd/httpd/trunk/modules/ssl/ssl_scache_memcache.c
Date Tue, 26 Feb 2008 15:25:52 GMT
Author: jorton
Date: Tue Feb 26 07:25:51 2008
New Revision: 631254

URL: http://svn.apache.org/viewvc?rev=631254&view=rev
Log:
* modules/ssl/ssl_scache_memcache.c (mc_session_id2sz): Fix memcache
  key id generation by passing the correct length to snprintf (it
  was NUL terminating at the second byte with len=2);

Modified:
    httpd/httpd/trunk/modules/ssl/ssl_scache_memcache.c

Modified: httpd/httpd/trunk/modules/ssl/ssl_scache_memcache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_scache_memcache.c?rev=631254&r1=631253&r2=631254&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_scache_memcache.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_scache_memcache.c Tue Feb 26 07:25:51 2008
@@ -181,7 +181,7 @@
 
     cp = apr_cpystrn(str, MC_TAG, MC_TAG_LEN);
     for (n = 0; n < idlen && n < maxlen; n++) {
-        apr_snprintf(cp, 2, "%02X", id[n]);
+        apr_snprintf(cp, 3, "%02X", (unsigned) id[n]);
         cp += 2;
     }
 



Mime
View raw message