From 6460bb18b79af2b49f1915d485f46820fa7ab723 Mon Sep 17 00:00:00 2001 From: jiangdi Date: Tue, 10 Jun 2025 12:54:01 +0000 Subject: [PATCH] Extend char mnebuf array to 50. Signed-off-by: jiangdi --- libcpu/riscv_disasm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcpu/riscv_disasm.c b/libcpu/riscv_disasm.c index 823fe9ca..0dee842a 100644 --- a/libcpu/riscv_disasm.c +++ b/libcpu/riscv_disasm.c @@ -164,7 +164,10 @@ riscv_disasm (Ebl *ebl, } char *mne = NULL; - char mnebuf[32]; + /* Max length is 24, which is "illegal", so we print it as + "0x<48 hex chars>" + See: No instruction encodings defined for these sizes yet, below */ + char mnebuf[50]; char *op[5] = { NULL, NULL, NULL, NULL, NULL }; char immbuf[32]; size_t len; -- Gitee