From 79983ce0ced51844381898366a81d39abfe24070 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 15 Mar 2006 14:12:26 +0000 Subject: Fix: incorrect string length passed --- Zend/zend_constants.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Zend') diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index 670a76199d..bc678e2e71 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -312,8 +312,8 @@ ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC) if (!(c->flags & CONST_CS)) { /* keep in mind that c->name_len already contains the '\0' */ - lowercase_name = estrndup(c->name, c->name_len); - zend_str_tolower(lowercase_name, c->name_len); + lowercase_name = estrndup(c->name, c->name_len-1); + zend_str_tolower(lowercase_name, c->name_len-1); name = lowercase_name; } else { name = c->name; -- cgit v1.2.1