cvs: php-src /ext/gettext gettext.c

From: Date: Tue, 16 Jan 2007 14:42:14 +0000
Subject: cvs: php-src /ext/gettext gettext.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-42742@lists.php.net to get a copy of this message
tony2001 Tue Jan 16 14:42:14 2007 UTC Modified files: /php-src/ext/gettext gettext.c Log: return false if realpath()/getcwd() fail http://cvs.php.net/viewvc.cgi/php-src/ext/gettext/gettext.c?r1=1.53&r2=1.54&diff_format=u Index: php-src/ext/gettext/gettext.c diff -u php-src/ext/gettext/gettext.c:1.53 php-src/ext/gettext/gettext.c:1.54 --- php-src/ext/gettext/gettext.c:1.53 Mon Jan 1 09:29:24 2007 +++ php-src/ext/gettext/gettext.c Tue Jan 16 14:42:14 2007 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gettext.c,v 1.53 2007/01/01 09:29:24 sebastian Exp $ */ +/* $Id: gettext.c,v 1.54 2007/01/16 14:42:14 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -236,9 +236,11 @@ php_error_docref(NULL TSRMLS_CC, E_WARNING, "the first parameter must not be empty"); } if (!dir_len || (dir_len == 1 && *dir_str == '0')) { - VCWD_GETCWD(dir_tmp, sizeof(dir_tmp)); - } else { - VCWD_REALPATH(dir_str, dir_tmp); + if (!VCWD_GETCWD(dir_tmp, sizeof(dir_tmp))) { + RETURN_FALSE; + } + } else if (!VCWD_REALPATH(dir_str, dir_tmp)) { + RETURN_FALSE; } RETURN_FS_STRING(bindtextdomain(domain_str, dir_tmp), ZSTR_DUPLICATE); }

« previous php.cvs (#42742) next »