From 517823449ebe8e3758b86c441cc74968b68e6491 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 10 Jan 2013 14:10:22 +0100 Subject: monitor: assert monitor_puts()'s loop invariant Chiefly to hush up Coverity. Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- monitor.c | 1 + 1 file changed, 1 insertion(+) (limited to 'monitor.c') diff --git a/monitor.c b/monitor.c index 9cf419b..c6eac60 100644 --- a/monitor.c +++ b/monitor.c @@ -270,6 +270,7 @@ static void monitor_puts(Monitor *mon, const char *str) char c; for(;;) { + assert(mon->outbuf_index < sizeof(mon->outbuf) - 1); c = *str++; if (c == '\0') break; -- cgit v1.1