Skip to content
Commit fa716d98 authored by Jungo Lin's avatar Jungo Lin Committed by Carles Cufí
Browse files

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: default avatarJungo Lin <jungolin.tw@gmail.com>
parent 512c1839
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment