From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VRlCe-000880-CE for mharc-qemu-trivial@gnu.org; Thu, 03 Oct 2013 11:52:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRisw-0008F2-0G for qemu-trivial@nongnu.org; Thu, 03 Oct 2013 09:24:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VRisr-0001ZF-Lq for qemu-trivial@nongnu.org; Thu, 03 Oct 2013 09:24:05 -0400 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:35070 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRisj-0001Xz-5f; Thu, 03 Oct 2013 09:23:53 -0400 Received: from localhost ([127.0.0.1] helo=sloy) by socrates.bennee.com with esmtp (Exim 4.80) (envelope-from ) id 1VRiuM-0004A2-Ei; Thu, 03 Oct 2013 15:25:34 +0200 References: <1380575089-11408-1-git-send-email-sw@weilnetz.de> User-agent: mu4e 0.9.9.5; emacs 24.3.1 From: Alex =?utf-8?Q?Benn=C3=A9e?= To: Stefan Weil 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 X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: alex.bennee@linaro.org X-SA-Exim-Scanned: No (on socrates.bennee.com); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 88.198.71.155 X-Mailman-Approved-At: Thu, 03 Oct 2013 11:52:35 -0400 Cc: qemu-trivial , qemu-stable , qemu-devel , Anthony Liguori , Gerd Hoffmann Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] qemu-char: Fix potential out of bounds accessto local arrayss X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Oct 2013 13:24:10 -0000 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 From mboxrd@z Thu Jan 1 00:00:00 1970 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