From ea3a3a1a2dc59342e451828c267d51b1dabbad08 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Tue, 8 Aug 2000 15:50:28 +0000 Subject: Fix possible crash when stat information is not available --- ext/standard/pageinfo.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ext/standard/pageinfo.c') 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; + } } } -- cgit v1.2.1