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

Details

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