From: Stanislav Malyshev Date: Tue, 8 Aug 2000 15:50:28 +0000 (+0000) Subject: Fix possible crash when stat information is not available X-Git-Tag: php-4.0.2RC1~188 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ea3a3a1a2dc59342e451828c267d51b1dabbad08;p=php Fix possible crash when stat information is not available --- diff --git a/ext/standard/pageinfo.c b/ext/standard/pageinfo.c index 07e1627023..716682c3b4 100644 --- a/ext/standard/pageinfo.c +++ b/ext/standard/pageinfo.c @@ -48,9 +48,11 @@ static void php_statpage(BLS_D) pstat = sapi_get_stat(); if (BG(page_uid)==-1) { - BG(page_uid) = pstat->st_uid; - BG(page_inode) = pstat->st_ino; - BG(page_mtime) = pstat->st_mtime; + if(pstat) { + BG(page_uid) = pstat->st_uid; + BG(page_inode) = pstat->st_ino; + BG(page_mtime) = pstat->st_mtime; + } } }