From: Felipe Pena Date: Wed, 20 Nov 2013 14:55:07 +0000 (-0200) Subject: - Fix extra byte allocation X-Git-Tag: php-5.6.0alpha1~110^2~170^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7384570bb25ab417737572e8cbae6424a4c4fea5;p=php - Fix extra byte allocation --- diff --git a/phpdbg_bp.c b/phpdbg_bp.c index 235990924f..1baccfd33b 100644 --- a/phpdbg_bp.c +++ b/phpdbg_bp.c @@ -92,7 +92,7 @@ void phpdbg_set_breakpoint_symbol(const char *name TSRMLS_DC) /* {{{ */ PHPDBG_G(flags) |= PHPDBG_HAS_SYM_BP; - new_break.symbol = estrndup(name, name_len + 1); + new_break.symbol = estrndup(name, name_len); new_break.id = PHPDBG_G(bp_count)++; zend_hash_update(&PHPDBG_G(bp)[PHPDBG_BREAK_SYM], new_break.symbol, @@ -110,7 +110,7 @@ void phpdbg_set_breakpoint_method(const char* class_name, const char* func_name HashTable class_breaks, *class_table; size_t class_len = strlen(class_name); size_t func_len = strlen(func_name); - + if (zend_hash_find(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD], class_name, class_len, (void**)&class_table) != SUCCESS) { zend_hash_init(&class_breaks, 8, NULL, phpdbg_class_breaks_dtor, 0);