[Xen-devel] [PATCH 17/32] readline: fix memory corruption when adding history

2015-04-22 Thread Andrew Cooper
From: Kaifeng Zhu idx can be down to 0, so TERM_MAX_CMDS-idx+1 could be TERM_MAX_CMDS+1, which exceeds the size of term_history. Signed-off-by: Kaifeng Zhu Coverity-ID: 1055739 Reviewed-by: Andrew Cooper --- readline.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rea

[Xen-devel] [PATCH 17/32] readline: fix memory corruption when adding history

2015-04-22 Thread Andrew Cooper
From: Kaifeng Zhu idx can be down to 0, so TERM_MAX_CMDS-idx+1 could be TERM_MAX_CMDS+1, which exceeds the size of term_history. Signed-off-by: Kaifeng Zhu Coverity-ID: 1055739 Reviewed-by: Andrew Cooper --- readline.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rea