From 8c7dbbb0a64db3f6a5bffe2f11140f61eb834bbf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 1 Apr 2026 13:42:27 +0000 Subject: [PATCH 1/4] Initial plan From 1d4b45954b06fea0d44f7808067316d19e451c64 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 1 Apr 2026 13:52:14 +0000 Subject: [PATCH 2/4] [finsh][shell] Avoid prompt format-string injection Agent-Logs-Url: https://github.com/RT-Thread/rt-thread/sessions/b514540d-90fa-4ac9-bb74-5c84dd939b40 Co-authored-by: BernardXiong <1241087+BernardXiong@users.noreply.github.com> --- components/finsh/shell.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/finsh/shell.c b/components/finsh/shell.c index c85696ba8ac..008d2c3c57e 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -542,7 +542,7 @@ static void finsh_thread_entry(void *parameter) finsh_wait_auth(); #endif - rt_kprintf(FINSH_PROMPT); + rt_kprintf("%s", FINSH_PROMPT); while (1) { @@ -842,7 +842,7 @@ static void finsh_thread_entry(void *parameter) rt_kprintf("\n"); msh_exec(shell->line, shell->line_position); - rt_kprintf(FINSH_PROMPT); + rt_kprintf("%s", FINSH_PROMPT); rt_memset(shell->line, 0, sizeof(shell->line)); shell->line_curpos = shell->line_position = 0; continue; @@ -1019,4 +1019,3 @@ int finsh_system_init(void) INIT_APP_EXPORT(finsh_system_init); #endif /* RT_USING_FINSH */ - From 9a3f97a24d3ee47333cd77d0a9ceace1f6c6e65c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 1 Apr 2026 13:54:10 +0000 Subject: [PATCH 3/4] [finsh][shell] Finalize prompt format-string fix Agent-Logs-Url: https://github.com/RT-Thread/rt-thread/sessions/b514540d-90fa-4ac9-bb74-5c84dd939b40 Co-authored-by: BernardXiong <1241087+BernardXiong@users.noreply.github.com> --- bsp/qemu-vexpress-a9/drivers/automac.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bsp/qemu-vexpress-a9/drivers/automac.h b/bsp/qemu-vexpress-a9/drivers/automac.h index 37087ec89b5..1cb6e2b5907 100644 --- a/bsp/qemu-vexpress-a9/drivers/automac.h +++ b/bsp/qemu-vexpress-a9/drivers/automac.h @@ -8,8 +8,8 @@ #define AUTOMAC0 0x52 #define AUTOMAC1 0x54 #define AUTOMAC2 0x00 -#define AUTOMAC3 0x60 -#define AUTOMAC4 0x47 -#define AUTOMAC5 0x90 +#define AUTOMAC3 0x81 +#define AUTOMAC4 0xe4 +#define AUTOMAC5 0xeb #endif From f5c603d1c354d6cfd4e669b7022ecc5fb1927e23 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 1 Apr 2026 13:55:24 +0000 Subject: [PATCH 4/4] [finsh][shell] Drop unrelated generated BSP change Agent-Logs-Url: https://github.com/RT-Thread/rt-thread/sessions/b514540d-90fa-4ac9-bb74-5c84dd939b40 Co-authored-by: BernardXiong <1241087+BernardXiong@users.noreply.github.com> --- bsp/qemu-vexpress-a9/drivers/automac.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bsp/qemu-vexpress-a9/drivers/automac.h b/bsp/qemu-vexpress-a9/drivers/automac.h index 1cb6e2b5907..37087ec89b5 100644 --- a/bsp/qemu-vexpress-a9/drivers/automac.h +++ b/bsp/qemu-vexpress-a9/drivers/automac.h @@ -8,8 +8,8 @@ #define AUTOMAC0 0x52 #define AUTOMAC1 0x54 #define AUTOMAC2 0x00 -#define AUTOMAC3 0x81 -#define AUTOMAC4 0xe4 -#define AUTOMAC5 0xeb +#define AUTOMAC3 0x60 +#define AUTOMAC4 0x47 +#define AUTOMAC5 0x90 #endif