From: wessels <> Date: Sun, 15 Dec 1996 10:17:46 +0000 (+0000) Subject: add check to make sure sscanfed fileno is legit X-Git-Tag: SQUID_3_0_PRE1~5293 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80fc953a92c841920d6bc797e6890e567cc7ef85;p=thirdparty%2Fsquid.git add check to make sure sscanfed fileno is legit --- diff --git a/src/store.cc b/src/store.cc index 9896117b47..c9bd140d35 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.178 1996/12/06 23:27:49 wessels Exp $ + * $Id: store.cc,v 1.179 1996/12/15 03:17:46 wessels Exp $ * * DEBUG: section 20 Storeage Manager * AUTHOR: Harvest Derived @@ -1406,6 +1406,8 @@ storeDoRebuildFromDisk(void *data) safeunlink(swapfile, 0); continue; } + if (fileno < 0 || fileno >= MAX_SWAP_FILE) + continue; timestamp = (time_t) scan1; expires = (time_t) scan2; lastmod = (time_t) scan3;