]> granicus.if.org Git - php/commitdiff
- Fix crash when NULL is passed to bindtextdomain() (sync with 5_3)
authorFelipe Pena <felipe@php.net>
Tue, 29 Jul 2008 16:21:38 +0000 (16:21 +0000)
committerFelipe Pena <felipe@php.net>
Tue, 29 Jul 2008 16:21:38 +0000 (16:21 +0000)
ext/gettext/gettext.c

index 45be9d9410413a5c7a54debe299b1a3c3e997f79..80282e0803f88abc3faadefe99160c09f57ee832 100644 (file)
@@ -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))) {