From: Antony Dovgal Date: Thu, 28 Dec 2006 22:36:59 +0000 (+0000) Subject: MFH X-Git-Tag: php-4.4.5RC1~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7637f98be2f0f15f67afc707e9dc04a1dd0e2539;p=php MFH --- diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 248b9ef37d..4ba48bc0bf 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -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; }