From 9524f6fc181fadf22d6d1d6e11faa4b32f2cd3cf Mon Sep 17 00:00:00 2001 From: orbisai0security Date: Sun, 17 May 2026 01:50:59 +0000 Subject: [PATCH] fix: V-011 security vulnerability Automated security fix generated by Orbis Security AI --- mupen64plus-rsp-cxd4/module.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mupen64plus-rsp-cxd4/module.c b/mupen64plus-rsp-cxd4/module.c index 4cae93855..a41ace415 100644 --- a/mupen64plus-rsp-cxd4/module.c +++ b/mupen64plus-rsp-cxd4/module.c @@ -291,9 +291,9 @@ void step_SP_commands(uint32_t inst) endian_swap[01] = (u8)((inst >> 16) & 0xFF); endian_swap[02] = (u8)((inst >> 8) & 0xFF); endian_swap[03] = (u8)((inst >> 0) & 0xFF); - sprintf(&offset[0], "%03X", GET_RCP_REG(SP_PC_REG) & 0xFFF); - sprintf(&code[0], "%08X", inst); - strcpy(text, offset); + snprintf(&offset[0], sizeof(offset), "%03X", GET_RCP_REG(SP_PC_REG) & 0xFFF); + snprintf(&code[0], sizeof(code), "%08X", inst); + snprintf(text, sizeof(text), "%s", offset); my_strcat(text, "\n"); my_strcat(text, code); message(text); /* PC offset, MIPS hex. */