Bug 223023

Summary: locate statistics cannot handle large databases
Product: Base System Reporter: Wolfram Schneider <wosch>
Component: binAssignee: Wolfram Schneider <wosch>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

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(-)