diff options
author | Xin LI <delphij@FreeBSD.org> | 2009-04-02 21:23:04 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2009-04-02 21:23:04 +0000 |
commit | ab85842c90ebb972bea90d12aac66d1bc7de4d2b (patch) | |
tree | 2a02b1cca0f2568fcbd833ebc7097ab09bbd116a /usr.bin/locate | |
parent | 0e875ecafe3e19b28d542178f9caa4981f29045f (diff) |
Notes
Diffstat (limited to 'usr.bin/locate')
-rw-r--r-- | usr.bin/locate/locate/fastfind.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/locate/locate/fastfind.c b/usr.bin/locate/locate/fastfind.c index e132dbd53e59b..d9ab2d0fe140d 100644 --- a/usr.bin/locate/locate/fastfind.c +++ b/usr.bin/locate/locate/fastfind.c @@ -216,6 +216,8 @@ fastfind count += c - OFFSET; } + if (count < 0 || count > MAXPATHLEN) + errx(1, "corrupted database: %s", database); /* overlay old path */ p = path + count; foundchar = p - 1; |