Skip to content

cli: fix escape buffer overflow check

Darryl Green requested to merge github/fork/zhilongwb/cli-escape into master

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

Merge request reports