From 9792718a3c889d8daba1e9631921772d3b169fd9 Mon Sep 17 00:00:00 2001 From: Rot127 Date: Sat, 27 May 2023 04:57:10 -0500 Subject: [PATCH] Replace strncpy with memcpy because we copy from larger to smaller buffer. --- arch/PowerPC/PPCInstPrinter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/PowerPC/PPCInstPrinter.c b/arch/PowerPC/PPCInstPrinter.c index 775a3e3ed9..1e654ba6eb 100644 --- a/arch/PowerPC/PPCInstPrinter.c +++ b/arch/PowerPC/PPCInstPrinter.c @@ -645,7 +645,7 @@ void PPC_printInst(MCInst *MI, SStream *O, void *Info) mnem_len = sizeof(MI->flat_insn->mnemonic) - 1; memset(MI->flat_insn->mnemonic, 0, sizeof(MI->flat_insn->mnemonic)); - strncpy(MI->flat_insn->mnemonic, O->buffer, mnem_len); + memcpy(MI->flat_insn->mnemonic, O->buffer, mnem_len); } // FIXME