Merge patch series "bios_emulator: Fix two issues found by Smatch"

Andrew Goodbody <andrew.goodbody@linaro.org> says:

Smatch found two issues in bios_emulator, a buffer overflow and missing
parens for a macro. Fix them both.

Link: https://lore.kernel.org/r/20250723-bios_emulator-v1-0-78b9ef7b9b4a@linaro.org
This commit is contained in:
Tom Rini 2025-07-29 13:14:52 -06:00
commit a8f20bb665
2 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,7 @@ static int atibios_debug_mode(BE_VGAInfo *vga_info, RMREGS *regs,
regs->e.edi = buffer_adr;
info = buffer;
memset(info, '\0', sizeof(*info));
strcpy(info->signature, "VBE2");
memcpy(info->signature, "VBE2", 4);
BE_int86(0x10, regs, regs);
if (regs->e.eax != 0x4f) {
debug("VESA_GET_INFO: error %x\n", regs->e.eax);

View File

@ -66,7 +66,7 @@ void x86emuOp2_illegal_op(
END_OF_INSTR();
}
#define xorl(a,b) ((a) && !(b)) || (!(a) && (b))
#define xorl(a, b) (((a) && !(b)) || (!(a) && (b)))
/****************************************************************************
REMARKS: