From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44633) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVaKM-0005Fh-V4 for qemu-devel@nongnu.org; Tue, 16 Feb 2016 02:45:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVaKI-00083x-OM for qemu-devel@nongnu.org; Tue, 16 Feb 2016 02:45:42 -0500 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]:38902) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVaKI-00083s-FL for qemu-devel@nongnu.org; Tue, 16 Feb 2016 02:45:38 -0500 Received: by mail-wm0-x22f.google.com with SMTP id a4so86557957wme.1 for ; Mon, 15 Feb 2016 23:45:38 -0800 (PST) Sender: Paolo Bonzini References: <1454784308-21177-1-git-send-email-mst@redhat.com> <1454784308-21177-23-git-send-email-mst@redhat.com> From: Paolo Bonzini Message-ID: <56C2D39D.8010005@redhat.com> Date: Tue, 16 Feb 2016 08:45:33 +0100 MIME-Version: 1.0 In-Reply-To: <1454784308-21177-23-git-send-email-mst@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL v2 22/45] ipmi: introduce a struct ipmi_sdr_compact List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" , qemu-devel@nongnu.org Cc: Marcel Apfelbaum , Corey Minyard , =?UTF-8?Q?C=c3=a9dric_Le_Goater?= , Greg Kurz On 06/02/2016 20:13, Michael S. Tsirkin wrote: > > - if (sdr[7] > MAX_SENSORS) { > + if (sdr->sensor_owner_number > MAX_SENSORS) { This is another off-by-one, it should have been >=. Same for all these occurrences later in the same file: hw/ipmi/ipmi_bmc_sim.c: if ((cmd[2] > MAX_SENSORS) || hw/ipmi/ipmi_bmc_sim.c: if ((cmd[2] > MAX_SENSORS) || hw/ipmi/ipmi_bmc_sim.c: if ((cmd[2] > MAX_SENSORS) || hw/ipmi/ipmi_bmc_sim.c: if ((cmd[2] > MAX_SENSORS) || hw/ipmi/ipmi_bmc_sim.c: if ((cmd[2] > MAX_SENSORS) || hw/ipmi/ipmi_bmc_sim.c: if ((cmd[2] > MAX_SENSORS) || hw/ipmi/ipmi_bmc_sim.c: if ((cmd[2] > MAX_SENSORS) || Thanks, Paolo > continue; > }