httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r656401 - /httpd/httpd/trunk/support/htcacheclean.c
Date Wed, 14 May 2008 20:14:29 GMT
Author: pquerna
Date: Wed May 14 13:14:29 2008
New Revision: 656401

URL: http://svn.apache.org/viewvc?rev=656401&view=rev
Log:
Check return value of apr_file_read_full.

Reported By: BOYA SUN <boya.sun case.edu>

Modified:
    httpd/httpd/trunk/support/htcacheclean.c

Modified: httpd/httpd/trunk/support/htcacheclean.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/htcacheclean.c?rev=656401&r1=656400&r2=656401&view=diff
==============================================================================
--- httpd/httpd/trunk/support/htcacheclean.c (original)
+++ httpd/httpd/trunk/support/htcacheclean.c Wed May 14 13:14:29 2008
@@ -532,14 +532,16 @@
 
                         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);



Mime
View raw message