From: Antony Dovgal Date: Thu, 28 Dec 2006 22:36:45 +0000 (+0000) Subject: make sure l != 0 X-Git-Tag: RELEASE_1_0_0RC1~457 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=36e75c5669f9f92ccfe4397f67ec21778577afb0;p=php make sure l != 0 --- 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; }