summaryrefslogtreecommitdiffstats
path: root/usr.bin/locate
diff options
context:
space:
mode:
authorwosch <wosch@FreeBSD.org>1996-12-13 20:28:24 +0000
committerwosch <wosch@FreeBSD.org>1996-12-13 20:28:24 +0000
commit4ad813db29ba756a35db6540961c86a4c1f5592b (patch)
tree6186276c83d061c648db5b79c208b1c79887a719 /usr.bin/locate
parente2e1dc3ceab4b0f734c89c6aa056fd14805ff507 (diff)
downloadFreeBSD-src-4ad813db29ba756a35db6540961c86a4c1f5592b.zip
FreeBSD-src-4ad813db29ba756a35db6540961c86a4c1f5592b.tar.gz
Fix uninitialized memory read for case insensitive search. Harmless.
submitted by: purify
Diffstat (limited to 'usr.bin/locate')
-rw-r--r--usr.bin/locate/locate/fastfind.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/locate/locate/fastfind.c b/usr.bin/locate/locate/fastfind.c
index 79dabfe..82fed56 100644
--- a/usr.bin/locate/locate/fastfind.c
+++ b/usr.bin/locate/locate/fastfind.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: fastfind.c,v 1.5 1996/10/23 16:46:47 ache Exp $
+ * $Id: fastfind.c,v 1.6 1996/10/27 19:18:06 alex Exp $
*/
@@ -185,6 +185,9 @@ fastfind
#ifdef FF_ICASE
/* set patend char to true */
+ for (c = 0; c < UCHAR_MAX + 1; c++)
+ table[c] = 0;
+
table[TOLOWER(*patend)] = 1;
table[toupper(*patend)] = 1;
#endif /* FF_ICASE */
OpenPOWER on IntegriCloud