tony2001                Thu Dec 28 22:36:45 2006 UTC

  Modified files:              
    /php-src/sapi/cgi   cgi_main.c 
  Log:
  make sure l != 0
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.305&r2=1.306&diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.305 php-src/sapi/cgi/cgi_main.c:1.306
--- php-src/sapi/cgi/cgi_main.c:1.305   Wed Nov 15 13:34:05 2006
+++ php-src/sapi/cgi/cgi_main.c Thu Dec 28 22:36:45 2006
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: cgi_main.c,v 1.305 2006/11/15 13:34:05 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.306 2006/12/28 22:36:45 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -825,7 +825,7 @@
                                                        int path_translated_len 
= 0;
                                                        char *path_translated = 
NULL;
                                                        
-                                                       if (env_document_root[l 
- 1] == '/') {
+                                                       if (l && 
env_document_root[l - 1] == '/') {
                                                                --l;
                                                        }
 

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

Reply via email to