Bug 223023 - locate statistics cannot handle large databases
Summary: locate statistics cannot handle large databases
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Wolfram Schneider
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-15 08:31 UTC by Wolfram Schneider
Modified: 2022-01-20 06:44 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfram Schneider freebsd_committer freebsd_triage 2017-10-15 08:31:51 UTC
`locate -S' may display wrong results for the statistics on large databases.

Fix: use a different type, e.g. uintmax_t
Comment 1 commit-hook freebsd_committer freebsd_triage 2022-01-20 06:29:00 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=cfa3856452b6a52cfb8fef44c86da7488b81447d

commit cfa3856452b6a52cfb8fef44c86da7488b81447d
Author:     Wolfram Schneider <wosch@FreeBSD.org>
AuthorDate: 2022-01-19 20:34:33 +0000
Commit:     Wolfram Schneider <wosch@FreeBSD.org>
CommitDate: 2022-01-20 06:27:08 +0000

    Use 64-bit integers for database statistics

    This fix (harmless) integer overflows for larger partitions (>2TB)

    PR: 223023

 usr.bin/locate/locate/fastfind.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)