summaryrefslogtreecommitdiff
path: root/Zend/zend_hash.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2005-04-25 06:13:57 +0000
committerDmitry Stogov <dmitry@php.net>2005-04-25 06:13:57 +0000
commitc78ec1615a1442b3575d70d3f2882911d615edb0 (patch)
treef7097b4225a2718afe2ecf79bdd0fd31867fc7c9 /Zend/zend_hash.c
parent11a91f04b2660447f6180d789f1072dc2548cb53 (diff)
downloadphp-git-c78ec1615a1442b3575d70d3f2882911d615edb0.tar.gz
Fixed call to estrndup() with invalid length
Diffstat (limited to 'Zend/zend_hash.c')
-rw-r--r--Zend/zend_hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c
index 22754aba9b..3778534086 100644
--- a/Zend/zend_hash.c
+++ b/Zend/zend_hash.c
@@ -1054,7 +1054,7 @@ ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **str_index, uint
if (p) {
if (p->nKeyLength) {
if (duplicate) {
- *str_index = estrndup(p->arKey, p->nKeyLength);
+ *str_index = estrndup(p->arKey, p->nKeyLength-1);
} else {
*str_index = p->arKey;
}