summaryrefslogtreecommitdiff
path: root/Zend/zend_constants.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2006-03-15 14:12:26 +0000
committerDmitry Stogov <dmitry@php.net>2006-03-15 14:12:26 +0000
commit79983ce0ced51844381898366a81d39abfe24070 (patch)
tree1c00e5e17035852303a5d6193ff97e25619ad1ea /Zend/zend_constants.c
parent6f76b17079a709415195a7c27607cd52d039d7c3 (diff)
downloadphp-git-79983ce0ced51844381898366a81d39abfe24070.tar.gz
Fix: incorrect string length passed
Diffstat (limited to 'Zend/zend_constants.c')
-rw-r--r--Zend/zend_constants.c4
1 files changed, 2 insertions, 2 deletions
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;