Received: from eggs.gnu.org ([2001:4830:134:3::10]:53558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRit4-0008UV-TS for qemu-devel@nongnu.org; Thu, 03 Oct 2013 09:24:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VRit0-0001aG-Mt for qemu-devel@nongnu.org; Thu, 03 Oct 2013 09:24:14 -0400 References: <1380575089-11408-1-git-send-email-sw@weilnetz.de> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <1380575089-11408-1-git-send-email-sw@weilnetz.de> Date: Thu, 03 Oct 2013 14:23:51 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] qemu-char: Fix potential out of bounds accessto local arrayss List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: qemu-trivial , qemu-stable , qemu-devel , Anthony Liguori , Gerd Hoffmann sw@weilnetz.de writes: > Latest gcc-4.8 supports a new option -fsanitize=address which activates > an AddressSanitizer. This AddressSanitizer stops the QEMU system emulation > very early because two character arrays of size 8 are potentially written > with 9 bytes. > > Commit 6ea314d91439741e95772dfbab98b4135e04bebb added the code. > > There is no obvious reason why width or height could need 8 characters, > so reduce it to 7 characters which together with the terminating '\0' > fit into the arrays. > > Cc: qemu-stable > Signed-off-by: Stefan Weil Reviewed-by: Alex Bennée -- Alex Bennée