diff options
author | Stanislav Malyshev <stas@php.net> | 2000-08-08 15:50:28 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2000-08-08 15:50:28 +0000 |
commit | ea3a3a1a2dc59342e451828c267d51b1dabbad08 (patch) | |
tree | bcc9005de8d95b79d9835e8e1d7a90331debaef3 /ext/standard/pageinfo.c | |
parent | bfcd9c4f28d77b91ec380772e520e303de03a7e4 (diff) | |
download | php-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.c | 8 |
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; + } } } |