From patchwork Thu Jan 10 13:10:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 211001 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 10C312C0346 for ; Fri, 11 Jan 2013 00:10:44 +1100 (EST) Received: from localhost ([::1]:37560 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtHu6-00082X-2e for incoming@patchwork.ozlabs.org; Thu, 10 Jan 2013 08:10:42 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtHtv-00082H-6g for qemu-devel@nongnu.org; Thu, 10 Jan 2013 08:10:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TtHtq-0004ju-I9 for qemu-devel@nongnu.org; Thu, 10 Jan 2013 08:10:31 -0500 Received: from oxygen.pond.sub.org ([2a01:4f8:121:10e4::3]:47289) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtHtq-0004je-BV for qemu-devel@nongnu.org; Thu, 10 Jan 2013 08:10:26 -0500 Received: from blackfin.pond.sub.org (p5B32A660.dip.t-dialin.net [91.50.166.96]) by oxygen.pond.sub.org (Postfix) with ESMTPA id 01A9A9FE66 for ; Thu, 10 Jan 2013 14:10:22 +0100 (CET) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 3D1B2200A9; Thu, 10 Jan 2013 14:10:22 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Thu, 10 Jan 2013 14:10:22 +0100 Message-Id: <1357823422-30850-1-git-send-email-armbru@redhat.com> X-Mailer: git-send-email 1.7.11.7 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:4f8:121:10e4::3 Cc: lcapitulino@redhat.com Subject: [Qemu-devel] [PATCH] monitor: assert monitor_puts()'s loop invariant X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Chiefly to hush up Coverity. Signed-off-by: Markus Armbruster --- 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;