From: Felipe Pena Date: Tue, 29 Jul 2008 16:21:38 +0000 (+0000) Subject: - Fix crash when NULL is passed to bindtextdomain() (sync with 5_3) X-Git-Tag: BEFORE_HEAD_NS_CHANGE~970 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e0054bfec7b67c69df79ea241dd6587c0c1fe1c;p=php - Fix crash when NULL is passed to bindtextdomain() (sync with 5_3) --- diff --git a/ext/gettext/gettext.c b/ext/gettext/gettext.c index 45be9d9410..80282e0803 100644 --- a/ext/gettext/gettext.c +++ b/ext/gettext/gettext.c @@ -234,6 +234,7 @@ PHP_NAMED_FUNCTION(zif_bindtextdomain) if (!domain_len) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "the first parameter must not be empty"); + RETURN_FALSE; } if (!dir_len || (dir_len == 1 && *dir_str == '0')) { if (!VCWD_GETCWD(dir_tmp, sizeof(dir_tmp))) {