]> granicus.if.org Git - php/commitdiff
- Fix #51688, ini per dir crashes when invalid document root are given
authorPierre Joye <pajoye@php.net>
Fri, 30 Apr 2010 08:15:09 +0000 (08:15 +0000)
committerPierre Joye <pajoye@php.net>
Fri, 30 Apr 2010 08:15:09 +0000 (08:15 +0000)
sapi/cgi/cgi_main.c

index 90158fb6169aa027ab653673d8b07c60fd464308..8b71faa08b19fac46260f7156c763740e81bcffa 100644 (file)
@@ -735,6 +735,9 @@ static void php_cgi_ini_activate_user_config(char *path, int path_len, const cha
 
                if (!IS_ABSOLUTE_PATH(path, path_len)) {
                        real_path = tsrm_realpath(path, NULL TSRMLS_CC);
+                       if (real_path == NULL) {
+                               return;
+                       }
                        real_path_len = strlen(real_path);
                        path = real_path;
                        path_len = real_path_len;