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

2015-04-22 Thread Andrew Cooper
From: Kaifeng Zhu kaifeng@citrix.com 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 kaifeng@citrix.com Coverity-ID: 1055739 Reviewed-by: Andrew Cooper andrew.coop...@citrix.com --- readline.c |

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

2015-04-22 Thread Andrew Cooper
From: Kaifeng Zhu kaifeng@citrix.com 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 kaifeng@citrix.com Coverity-ID: 1055739 Reviewed-by: Andrew Cooper andrew.coop...@citrix.com --- readline.c |