Received: from eggs.gnu.org ([208.118.235.92]:53863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScFmO-0000JH-1a for qemu-devel@nongnu.org; Wed, 06 Jun 2012 08:56:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ScFmL-0006u0-Bb for qemu-devel@nongnu.org; Wed, 06 Jun 2012 08:56:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55997) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScFmL-0006th-3Y for qemu-devel@nongnu.org; Wed, 06 Jun 2012 08:56:01 -0400 From: Markus Armbruster References: <1338900668-6093-1-git-send-email-armbru@redhat.com> <1338900668-6093-3-git-send-email-armbru@redhat.com> Date: Wed, 06 Jun 2012 14:55:48 +0200 In-Reply-To: (Peter Maydell's message of "Wed, 6 Jun 2012 12:52:19 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/2] xen: Don't peek behind the BlockDriverState abstraction List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefano.stabellini@eu.citrix.com Peter Maydell writes: > On 5 June 2012 13:51, Markus Armbruster wrote: >> @@ -554,6 +553,7 @@ static int blk_init(struct XenDevice *xendev) >> =C2=A0{ >> =C2=A0 =C2=A0 struct XenBlkDev *blkdev =3D container_of(xendev, struct X= enBlkDev, xendev); >> =C2=A0 =C2=A0 int index, qflags, info =3D 0; >> + =C2=A0 =C2=A0char fmt_name[128]; > > Fixed length array with a hardcoded magic number size ? > If the block layer guarantees that format names are going to be > less than 128 bytes it ought to provide a suitable #define for > people to set array sizes to... Maybe it should, but it doesn't. Does it really matter in this particular case? If somebody insists on giving his driver a name longer than 127 characters, we'll silently log it truncated, that's all.