Received: from eggs.gnu.org ([208.118.235.92]:40276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtMfk-0004DZ-2K for qemu-devel@nongnu.org; Thu, 10 Jan 2013 13:16:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TtMfi-0004kQ-9w for qemu-devel@nongnu.org; Thu, 10 Jan 2013 13:16:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:9986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtMfi-0004kK-2r for qemu-devel@nongnu.org; Thu, 10 Jan 2013 13:16:10 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0AIG814012576 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 10 Jan 2013 13:16:09 -0500 Date: Thu, 10 Jan 2013 15:20:21 -0200 From: Luiz Capitulino Message-ID: <20130110152021.2b7fe9ce@doriath.home> In-Reply-To: <1357823422-30850-1-git-send-email-armbru@redhat.com> References: <1357823422-30850-1-git-send-email-armbru@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] monitor: assert monitor_puts()'s loop invariant List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org On Thu, 10 Jan 2013 14:10:22 +0100 Markus Armbruster wrote: > Chiefly to hush up Coverity. > > Signed-off-by: Markus Armbruster Applied to the qmp branch, thanks. > --- > monitor.c | 1 + > 1 file changed, 1 insertion(+) > > 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;