summaryrefslogtreecommitdiffstats
path: root/support/htcacheclean.c
diff options
context:
space:
mode:
authorPaul Querna <pquerna@apache.org>2008-05-14 22:14:29 +0200
committerPaul Querna <pquerna@apache.org>2008-05-14 22:14:29 +0200
commit590c6ee6371d8c555c11b4fbabcff0ad125a12dc (patch)
tree6ab90d5dde27cf329c46493e4618aa9d473362ec /support/htcacheclean.c
parent* Check for failure of apr_file_info_get call (diff)
downloadapache2-590c6ee6371d8c555c11b4fbabcff0ad125a12dc.tar.xz
apache2-590c6ee6371d8c555c11b4fbabcff0ad125a12dc.zip
Check return value of apr_file_read_full.
Reported By: BOYA SUN <boya.sun case.edu> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@656401 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support/htcacheclean.c')
-rw-r--r--support/htcacheclean.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/support/htcacheclean.c b/support/htcacheclean.c
index 7b923b4071..6a0a062619 100644
--- a/support/htcacheclean.c
+++ b/support/htcacheclean.c
@@ -532,14 +532,16 @@ static int process_dir(char *path, apr_pool_t *pool)
len = sizeof(expires);
- apr_file_read_full(fd, &expires, len, &len);
+ if (apr_file_read_full(fd, &expires, len,
+ &len) == APR_SUCCESS) {
- apr_file_close(fd);
+ apr_file_close(fd);
- if (expires < current) {
- delete_entry(path, d->basename, p);
+ if (expires < current) {
+ delete_entry(path, d->basename, p);
+ }
+ break;
}
- break;
}
}
apr_file_close(fd);