summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-12-28 22:36:45 +0000
committerAntony Dovgal <tony2001@php.net>2006-12-28 22:36:45 +0000
commit36e75c5669f9f92ccfe4397f67ec21778577afb0 (patch)
tree89a6de3ae561e51331c88d0993e50306f346266d /sapi
parent52d9ed7b345dda54b7b294e33cc685e1ce888b0d (diff)
downloadphp-git-36e75c5669f9f92ccfe4397f67ec21778577afb0.tar.gz
make sure l != 0
Diffstat (limited to 'sapi')
-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 707e492eb5..665761955e 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -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;
}