]> granicus.if.org Git - php/commitdiff
make sure l != 0
authorAntony Dovgal <tony2001@php.net>
Thu, 28 Dec 2006 22:36:45 +0000 (22:36 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 28 Dec 2006 22:36:45 +0000 (22:36 +0000)
sapi/cgi/cgi_main.c

index 707e492eb5be9f90e6ed70caeb0035b41b4b51e8..665761955e30338d8a3581afcc84c7b3ceb334d9 100644 (file)
@@ -825,7 +825,7 @@ static void init_request_info(TSRMLS_D)
                                                        int path_translated_len = 0;
                                                        char *path_translated = NULL;
                                                        
-                                                       if (env_document_root[l - 1] == '/') {
+                                                       if (l && env_document_root[l - 1] == '/') {
                                                                --l;
                                                        }