mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
memchr(3) will happily believe we've passed in a valid object, but hostsize could easily exceed the bounds of fullhost. Clamp it down to the string size to be safe and avoid UB. This plugs a potential overread noted in the compat shim that was just added. Reviewed by: des Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D54623