laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/libosmocore/+/14447 )

Change subject: command.c: Improve return check condition in 
cmd_execut_command_real()
......................................................................

command.c: Improve return check condition in cmd_execut_command_real()

Check against MAX argc is changed to == since it cannot be incremented
twice without passing the check.

Change-Id: Ia330e475989fda863bedcc3cbf94deaf8dd83037
---
M src/vty/command.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  fixeria: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/vty/command.c b/src/vty/command.c
index 4189c7c..b26e991 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -2313,7 +2313,7 @@
                                argv[argc++] = vector_slot(vline, i);
                }

-               if (argc >= CMD_ARGC_MAX)
+               if (argc == CMD_ARGC_MAX)
                        return CMD_ERR_EXEED_ARGC_MAX;
        }

@@ -2458,7 +2458,7 @@
                                argv[argc++] = vector_slot(vline, i);
                }

-               if (argc >= CMD_ARGC_MAX)
+               if (argc == CMD_ARGC_MAX)
                        return CMD_ERR_EXEED_ARGC_MAX;
        }


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/14447
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia330e475989fda863bedcc3cbf94deaf8dd83037
Gerrit-Change-Number: 14447
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to