cli_simple.c: fix possible overflow when copying the string