From 59dcebd60424ee3f0a7c1cca1d661d5e982b48b3 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 17 Jun 2013 13:27:40 +0200 Subject: sample: Fix a possible buffer overrun. --- examples/sample.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/sample.c b/examples/sample.c index cfe4b3a6..93634d80 100644 --- a/examples/sample.c +++ b/examples/sample.c @@ -60,9 +60,12 @@ struct ssh_callbacks_struct cb = { static void add_cmd(char *cmd){ int n; - for(n=0;cmds[n] && (n