This is an automated email from Gerrit.

"Tomas Vanek <[email protected]>" just uploaded a new patch set to Gerrit, which 
you can find at https://review.openocd.org/c/openocd/+/9132

-- gerrit

commit 121f30dc1ead391a81ce5bb87144a28ed2228ecd
Author: Tomas Vanek <[email protected]>
Date:   Wed Sep 17 15:10:03 2025 +0200

    target/riscv: fix checking of nuber of parametrs
    
    in command 'riscv resume_order' to prevent segfault
    on issuing the command without a parameter.
    
    Change-Id: I5d7f4f92c2fa8e9effaba2c000d111e491b7b64f
    Signed-off-by: Tomas Vanek <[email protected]>

diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c
index dae129997f..44a02a145f 100644
--- a/src/target/riscv/riscv.c
+++ b/src/target/riscv/riscv.c
@@ -4836,7 +4836,7 @@ COMMAND_HANDLER(riscv_set_ir)
 
 COMMAND_HANDLER(riscv_resume_order)
 {
-       if (CMD_ARGC > 1)
+       if (CMD_ARGC != 1)
                return ERROR_COMMAND_SYNTAX_ERROR;
 
        if (!strcmp(CMD_ARGV[0], "normal")) {

-- 

Reply via email to