HomeFreeBSD

Fix too small hostname buffer in bootparamd

Description

Fix too small hostname buffer in bootparamd

This fixes the following warning from clang 14:

usr.sbin/bootparamd/bootparamd/bootparamd.c:204:32: error: 'fscanf' may
overflow; destination buffer in argument 3 has size 255, but the
corresponding specifier may require size 256 [-Werror,-Wfortify-source]

The MAX_MACHINE_NAME macro indicates the maximum number of bytes in a
machine name, but it does not include the NUL terminator required for
scanf.

MFC after: 3 days

Details

Provenance
dimAuthored on Feb 6 2022, 2:25 PM
Parents
rG8ea3ceda7644: fs: fix a few common typos in source code comments
Branches
Unknown
Tags
Unknown