HomeFreeBSD

Correct an out of bounds read with HN_AUTOSCALE and very large numbers.

Description

Correct an out of bounds read with HN_AUTOSCALE and very large numbers.

The maximum scale is 6 (K, M, G, T, P, E) (B is 0).

Overly large explict scales were checked correctly, but for sufficently
large numbers HN_AUTOSCALE would get to 7 resulting in an out of bounds
read.

Found with humanize_number_test and CHERI bounds checking.

Reviewed by: emaste
Obtained from: CheriBSD
MFC after: 1 week
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D10376

Details

Provenance
brooksAuthored on
Reviewer
emaste
Differential Revision
D10376: The maximum scale is 6 (K, M, G, T, P, E) (B is 0).
Parents
rS316765: MFC r316617 (partial):
Branches
Unknown
Tags
Unknown