summaryrefslogtreecommitdiff
path: root/ext/standard/pageinfo.c
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2000-08-08 15:50:28 +0000
committerStanislav Malyshev <stas@php.net>2000-08-08 15:50:28 +0000
commitea3a3a1a2dc59342e451828c267d51b1dabbad08 (patch)
treebcc9005de8d95b79d9835e8e1d7a90331debaef3 /ext/standard/pageinfo.c
parentbfcd9c4f28d77b91ec380772e520e303de03a7e4 (diff)
downloadphp-git-ea3a3a1a2dc59342e451828c267d51b1dabbad08.tar.gz
Fix possible crash when stat information is not available
Diffstat (limited to 'ext/standard/pageinfo.c')
-rw-r--r--ext/standard/pageinfo.c8
1 files changed, 5 insertions, 3 deletions
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;
+ }
}
}