commit | fa716d9842f203f0ed5eab69064e8f27c6192d34 | [log] [tgz] |
---|---|---|
author | Jungo Lin <jungolin.tw@gmail.com> | Sun Mar 10 10:42:52 2024 +0800 |
committer | Carles CufĂ <carles.cufi@nordicsemi.no> | Mon May 27 08:16:36 2024 -0700 |
tree | 10fbb579feb2aab536f76d4ff6ea64aeefef1aed | |
parent | 512c18393a36d8f63542a746dd21486fff424ddd [diff] |
shell: fix index out bound issue In order to prevent index out of bounds access of the sh->ctx->cmd_buff array when sh->ctx->cmd_buff_pos is 0, it has been added a check for the value of sh->ctx->cmd_buff_pos. This ensures that the array will not be accessed beyond its boundaries. Signed-off-by: Jungo Lin <jungolin.tw@gmail.com>