From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0EDAB1A1F25 for ; Wed, 21 Sep 2016 18:37:35 -0700 (PDT) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 97B0DC05A2B5; Thu, 22 Sep 2016 01:37:34 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-25.phx2.redhat.com [10.3.116.25]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8M1bW6x015864; Wed, 21 Sep 2016 21:37:33 -0400 To: Dandan Bi , edk2-devel@ml01.01.org References: <1474507298-106676-1-git-send-email-dandan.bi@intel.com> Cc: Jordan Justen , Liming Gao From: Laszlo Ersek Message-ID: <2c418c23-61e9-6d02-dfac-5df5da8e81cd@redhat.com> Date: Thu, 22 Sep 2016 03:37:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1474507298-106676-1-git-send-email-dandan.bi@intel.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 22 Sep 2016 01:37:34 +0000 (UTC) Subject: Re: [PATCH v2] OvmfPkg: Fix VS toolchain build failure X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 01:37:35 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 09/22/16 03:21, Dandan Bi wrote: > V2: add the assert codes. > > Cc: Jordan Justen > Cc: Laszlo Ersek > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Dandan Bi > --- > OvmfPkg/VirtioGpuDxe/Commands.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/OvmfPkg/VirtioGpuDxe/Commands.c b/OvmfPkg/VirtioGpuDxe/Commands.c > index b369dc3..962087c 100644 > --- a/OvmfPkg/VirtioGpuDxe/Commands.c > +++ b/OvmfPkg/VirtioGpuDxe/Commands.c > @@ -282,16 +282,17 @@ VirtioGpuSendCommand ( > } > Header->CtxId = 0; > Header->Padding = 0; > > ASSERT (RequestSize >= sizeof *Header); > + ASSERT (RequestSize <= MAX_UINT32); > > // > // Compose the descriptor chain. > // > VirtioPrepare (&VgpuDev->Ring, &Indices); > - VirtioAppendDesc (&VgpuDev->Ring, (UINTN)Header, RequestSize, > + VirtioAppendDesc (&VgpuDev->Ring, (UINTN)Header, (UINT32)RequestSize, > VRING_DESC_F_NEXT, &Indices); > VirtioAppendDesc (&VgpuDev->Ring, (UINTN)&Response, sizeof Response, > VRING_DESC_F_WRITE, &Indices); > > // > Reviewed-by: Laszlo Ersek