tony2001                Tue Jan 16 14:42:38 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/gettext        gettext.c 
  Log:
  MFH: return false if realpath()/getcwd() fail
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gettext/gettext.c?r1=1.46.2.2.2.3&r2=1.46.2.2.2.4&diff_format=u
Index: php-src/ext/gettext/gettext.c
diff -u php-src/ext/gettext/gettext.c:1.46.2.2.2.3 
php-src/ext/gettext/gettext.c:1.46.2.2.2.4
--- php-src/ext/gettext/gettext.c:1.46.2.2.2.3  Mon Jan  1 09:36:01 2007
+++ php-src/ext/gettext/gettext.c       Tue Jan 16 14:42:38 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: gettext.c,v 1.46.2.2.2.3 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: gettext.c,v 1.46.2.2.2.4 2007/01/16 14:42:38 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -253,9 +253,11 @@
        }
        
        if (Z_STRVAL_PP(dir)[0] != '\0' && strcmp(Z_STRVAL_PP(dir), "0")) {
-               VCWD_REALPATH(Z_STRVAL_PP(dir), dir_name);
-       } else {
-               VCWD_GETCWD(dir_name, MAXPATHLEN);
+               if (!VCWD_REALPATH(Z_STRVAL_PP(dir), dir_name)) {
+                       RETURN_FALSE;
+               }
+       } else if (!VCWD_GETCWD(dir_name, MAXPATHLEN)) {
+               RETURN_FALSE;
        }
 
        retval = bindtextdomain(Z_STRVAL_PP(domain_name), dir_name);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to