cli: fix escape buffer overflow check
Created by: zhilongwb
This commit add escape buffer overflow check when cli receive escape sequence(cursor position response). escape buffer size is 8 bytes, the last byte used to store string end symbol '\0'. So the longest string escape buffer can save is 7 bytes. But in some console or tool, the cursor position response sequence is more then 7 bytes, and escap buffer will overflow. This patch fix it.
Signed-off-by: Zhilong Wubin zhilong.wb@alibaba-inc.com