From ab0ee5aa5235ed98ae75bbdaee83a96819d1e896 Mon Sep 17 00:00:00 2001 From: Ben Fuhrmannek Date: Sat, 15 Nov 2014 10:48:42 +0100 Subject: fixed crash with PHP 5.3 and disable_display_errors=fail --- suhosin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/suhosin.c b/suhosin.c index 00cd264..c19a2b8 100644 --- a/suhosin.c +++ b/suhosin.c @@ -1016,9 +1016,9 @@ PHP_MINIT_FUNCTION(suhosin) zend_ini_entry *i; if (zend_hash_find(EG(ini_directives), "display_errors", sizeof("display_errors"), (void **) &i) == SUCCESS) { if (i->on_modify) { - i->on_modify(i, "0", strlen("0"), i->mh_arg1, i->mh_arg2, i->mh_arg3, ZEND_INI_STAGE_STARTUP TSRMLS_CC); + i->on_modify(i, "0", 1, i->mh_arg1, i->mh_arg2, i->mh_arg3, ZEND_INI_STAGE_STARTUP TSRMLS_CC); if (SUHOSIN_G(disable_display_errors) > 1) { - i->value = estrdup("0"); + i->value = "0"; i->value_length = strlen(i->value); i->on_modify = OnUpdate_fail; } else { -- cgit v1.3