Received: from eggs.gnu.org ([2001:4830:134:3::10]:49422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRPNe-0004D9-60 for qemu-devel@nongnu.org; Wed, 02 Oct 2013 12:34:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VRPNY-00082U-4t for qemu-devel@nongnu.org; Wed, 02 Oct 2013 12:34:30 -0400 Message-ID: <524C4B04.9040208@msgid.tls.msk.ru> Date: Wed, 02 Oct 2013 20:34:12 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <1380575089-11408-1-git-send-email-sw@weilnetz.de> In-Reply-To: <1380575089-11408-1-git-send-email-sw@weilnetz.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] qemu-char: Fix potential out of bounds access to local arrays 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 01.10.2013 01:04, Stefan Weil wrote: > 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. A good one. Thanks, applied to the trivial patches queue. /mjt