From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTfvB-0004r5-1J for qemu-devel@nongnu.org; Fri, 28 Mar 2014 19:10:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTfv4-0000yi-Kn for qemu-devel@nongnu.org; Fri, 28 Mar 2014 19:10:44 -0400 Message-ID: <53360148.8090609@redhat.com> Date: Sat, 29 Mar 2014 00:10:00 +0100 From: Max Reitz MIME-Version: 1.0 References: <1395835569-21193-1-git-send-email-stefanha@redhat.com> <1395835569-21193-34-git-send-email-stefanha@redhat.com> In-Reply-To: <1395835569-21193-34-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-2.0 33/47] dmg: prevent out-of-bounds array access on terminator List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Kevin Wolf , pmatouse@redhat.com, qemu-stable@nongnu.org On 26.03.2014 13:05, Stefan Hajnoczi wrote: > When a terminator is reached the base for offsets and sectors is stored. > The following records that are processed will use this base value. > > If the first record we encounter is a terminator, then calculating the > base values would result in out-of-bounds array accesses. Don't do > that. > > Signed-off-by: Stefan Hajnoczi > Signed-off-by: Kevin Wolf > --- > block/dmg.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Max Reitz