cvs: php4 /ext/standard pageinfo.c
| From: | Stanislav Malyshev | Date: | Tue, 08 Aug 2000 15:50:30 +0000 |
| Subject: | cvs: php4 /ext/standard pageinfo.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1102@lists.php.net to get a copy of this message | ||
stas Tue Aug 8 08:50:30 2000 EDT
Modified files:
/php4/ext/standard pageinfo.c
Log:
Fix possible crash when stat information is not available
Index: php4/ext/standard/pageinfo.c
diff -u php4/ext/standard/pageinfo.c:1.19 php4/ext/standard/pageinfo.c:1.20
--- php4/ext/standard/pageinfo.c:1.19 Sun Jul 23 18:39:49 2000
+++ php4/ext/standard/pageinfo.c Tue Aug 8 08:50:28 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pageinfo.c,v 1.19 2000/07/24 01:39:49 david Exp $ */
+/* $Id: pageinfo.c,v 1.20 2000/08/08 15:50:28 stas Exp $ */
#include "php.h"
#include "pageinfo.h"
@@ -48,9 +48,11 @@
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;
+ }
}
}