diff options
author | Tom Rini <trini@konsulko.com> | 2025-07-29 13:14:52 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-07-29 13:14:52 -0600 |
commit | a8f20bb6650df56d2600cda2c66f9349df9e49c8 (patch) | |
tree | 58690f97f183da297a9df6c4901bef44157a470e | |
parent | ae409a84e7bffb0c5a0d420d72806ac7b854f619 (diff) | |
parent | 0fdcca86d87b3b723cdfc9901f02f14adba9df60 (diff) |
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
-rw-r--r-- | drivers/bios_emulator/atibios.c | 2 | ||||
-rw-r--r-- | drivers/bios_emulator/x86emu/ops2.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/bios_emulator/atibios.c b/drivers/bios_emulator/atibios.c index d544ffb5ffb..e992a1aa822 100644 --- a/drivers/bios_emulator/atibios.c +++ b/drivers/bios_emulator/atibios.c @@ -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); diff --git a/drivers/bios_emulator/x86emu/ops2.c b/drivers/bios_emulator/x86emu/ops2.c index 1ff27b2af95..29a166f7fe9 100644 --- a/drivers/bios_emulator/x86emu/ops2.c +++ b/drivers/bios_emulator/x86emu/ops2.c @@ -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: |