From 590c6ee6371d8c555c11b4fbabcff0ad125a12dc Mon Sep 17 00:00:00 2001 From: Paul Querna Date: Wed, 14 May 2008 20:14:29 +0000 Subject: Check return value of apr_file_read_full. Reported By: BOYA SUN git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@656401 13f79535-47bb-0310-9956-ffa450edef68 --- support/htcacheclean.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'support/htcacheclean.c') 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); -- cgit v1.2.3