summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sapi/cgi/cgi_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 2851afcae0..bf24ef0090 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -849,7 +849,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;
}