pajoye Wed Aug 8 06:29:47 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/openssl openssl.c
Log:
- fix regression introduced with #42222 (thx to tony and mattias for the
head up)
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.98.2.5.2.40&r2=1.98.2.5.2.41&diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.98.2.5.2.40
php-src/ext/openssl/openssl.c:1.98.2.5.2.41
--- php-src/ext/openssl/openssl.c:1.98.2.5.2.40 Mon Aug 6 19:49:45 2007
+++ php-src/ext/openssl/openssl.c Wed Aug 8 06:29:46 2007
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: openssl.c,v 1.98.2.5.2.40 2007/08/06 19:49:45 pajoye Exp $ */
+/* $Id: openssl.c,v 1.98.2.5.2.41 2007/08/08 06:29:46 pajoye Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1726,7 +1726,7 @@
/* Finally apply defaults from config file */
for(i = 0; i < sk_CONF_VALUE_num(dn_sk); i++) {
int len;
- char buffer[200];
+ char buffer[200 + 1]; /*200 + \0 !*/
v = sk_CONF_VALUE_value(dn_sk, i);
type = v->name;
@@ -1743,7 +1743,7 @@
len = 200;
}
memcpy(buffer, type, len);
- buffer[len - 1] = '\0';
+ buffer[len] = '\0';
type = buffer;
/* Skip past any leading X. X: X, etc to allow for
multiple
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php