HomeFreeBSD

smbios: Carefully print wrong entry point signature on identify

Description

smbios: Carefully print wrong entry point signature on identify

Using printf() with '%s' can lead to arbitrary long printing (although,
usually, a NUL byte should appear quite quickly) and trying to print
unprintable characters.

Instead, print in hexadecimal the exact bytes that are compared to the
expected signature.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

(cherry picked from commit bb04712e37723d112b2fad28af4b035ef35a25be)

Details

Provenance
olceAuthored on Mar 3 2025, 9:30 AM
Parents
rG7dffa9db4516: smbios: Print an error on unexpected entry point length on identify
Branches
Unknown
Tags
Unknown