diff options
| author | Xin LI <delphij@FreeBSD.org> | 2009-04-11 14:10:42 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2009-04-11 14:10:42 +0000 |
| commit | 6efa82395606cbe13b7a7a43d624d4738a77171b (patch) | |
| tree | 528f18c7234fad8c3b8ba12397e948e29ccb3a9d /usr.bin | |
| parent | b89025b00e0788ea24ac5ed3af8b56cf0952fbaf (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -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 e132dbd53e59..d9ab2d0fe140 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; |
