1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 11:32:11 +02:00

@* Fixed a possible crash in get_class_methods() (Zeev)

This commit is contained in:
Zeev Suraski
2000-12-22 12:08:04 +00:00
parent 3e28346336
commit 0fcce4a77a

View File

@@ -1029,8 +1029,10 @@ ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **str_index, ulong
if (p) {
if (p->nKeyLength) {
*str_index = (char *) pemalloc(p->nKeyLength, ht->persistent);
memcpy(*str_index, p->arKey, p->nKeyLength);
*str_index = (char *) estrndup(p->arKey, p->nKeyLength);
if (ht->persistent) {
persist_alloc(*str_index);
}
if (str_length) {
*str_length = p->nKeyLength;
}