]> granicus.if.org Git - apache/commitdiff
htcacheclean: If the cache file format is unrecognised, remove the entry
authorGraham Leggett <minfrin@apache.org>
Wed, 29 Sep 2010 15:41:15 +0000 (15:41 +0000)
committerGraham Leggett <minfrin@apache.org>
Wed, 29 Sep 2010 15:41:15 +0000 (15:41 +0000)
from the cache.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1002686 13f79535-47bb-0310-9956-ffa450edef68

support/htcacheclean.c

index 72983ce5584d49655bb3220c6982297b2d9de676..fef8e854dad1255e3e4135fbede070c2ffd8a554 100644 (file)
@@ -509,6 +509,12 @@ static int process_dir(char *path, apr_pool_t *pool)
                                         p);
                         break;
                     }
+                    else {
+                        /* We didn't recognise the format, kill the files */
+                        apr_file_close(fd);
+                        delete_entry(path, d->basename, p);
+                        break;
+                    }
                 }
                 else {
                     apr_file_close(fd);