]> granicus.if.org Git - php/commitdiff
MFH
authorAntony Dovgal <tony2001@php.net>
Thu, 28 Dec 2006 22:36:59 +0000 (22:36 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 28 Dec 2006 22:36:59 +0000 (22:36 +0000)
sapi/cgi/cgi_main.c

index 248b9ef37df58d71b014d5a21941824320d06381..4ba48bc0bf003183c09e87fc7d5374bccdc47df0 100644 (file)
@@ -811,7 +811,7 @@ static void init_request_info(TSRMLS_D)
                                                        int l = strlen(env_document_root);
                                                        int path_translated_len = 0;
                                                        char *path_translated = NULL;
-                                                       if (env_document_root[l-1]=='/') {
+                                                       if (l && env_document_root[l-1]=='/') {
                                                                --l;
                                                        }