summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2013-01-10 14:10:22 +0100
committerLuiz Capitulino <lcapitulino@redhat.com>2013-01-10 14:47:56 -0200
commit517823449ebe8e3758b86c441cc74968b68e6491 (patch)
treef5308c968185dfc4d0c0f962313345925b352275
parent6ad53bdf5830bfc30221aee8d4ced9a9eaf8fe03 (diff)
downloadqemu-517823449ebe8e3758b86c441cc74968b68e6491.tar.gz
qemu-517823449ebe8e3758b86c441cc74968b68e6491.tar.bz2
qemu-517823449ebe8e3758b86c441cc74968b68e6491.zip
monitor: assert monitor_puts()'s loop invariant
Chiefly to hush up Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
-rw-r--r--monitor.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/monitor.c b/monitor.c
index 9cf419bb1d..c6eac608a3 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;