[PATCH 5/5] programs/cmd: Fixed an invalid memory access spotted by SAST.