From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web09.24851.1662386115629775437 for ; Mon, 05 Sep 2022 06:55:15 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eHYbBDMM; spf=pass (domain: kernel.org, ip: 139.178.84.217, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0419B612DC for ; Mon, 5 Sep 2022 13:55:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67C06C433D7 for ; Mon, 5 Sep 2022 13:55:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662386114; bh=vZZrgDe94taSHmVMI4cbRXriJa0u7eqZqlB8S+kXuDA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=eHYbBDMMHRTdxCW1oKPqjoltZC5BDVXMvaoS01xNMDeEkZArk1yYqHk6tSrTYQxUV skIadhdvSSFAMFycJWDOJjmBa/S2LsVyeP5VApCznJO0VIokbrxNM/GsQ2B0YUk34F jrjvgumOHNqOnbrRga0jKzyITbNljwWMmdjThdFIObuch/jpDa0cBGVh7A3MnTjNHj cs/KOxpkqBoTYdHDLe0wuDZg/iHfIFHNzqNFmcQt8GrCaw6lebL6cBMPCXNn25vGGG 0pHmMnxYkRHeyHmwz8t4XatONZ/zGOK+bioCQVs+7VCQQ83lz9/l879S8bJDSWbfOf 6fi1mg/spbGXg== Received: by mail-lj1-f179.google.com with SMTP id k18so9287470lji.13 for ; Mon, 05 Sep 2022 06:55:14 -0700 (PDT) X-Gm-Message-State: ACgBeo0mTIKAM4njvX9nOdS+ZL8SyuibaLUMpTcy9CQhCkh+SPWVfe5g b+Kg8dBZJLgn7L51HTwj37+ZhD3kJFxPXYMgdek= X-Google-Smtp-Source: AA6agR5MZUyuxKtdmt9Q3/q6lQjE1gEV3ZEn3Glqx9VLpk/TKDg+54HyRHoN/vurIMX6GSHT6W/YHYJ8BAOMONmTRg8= X-Received: by 2002:a05:651c:11c6:b0:265:d1cb:b7b4 with SMTP id z6-20020a05651c11c600b00265d1cbb7b4mr9190573ljo.69.1662386112468; Mon, 05 Sep 2022 06:55:12 -0700 (PDT) MIME-Version: 1.0 References: <20220824023123.3060905-1-yuanyu@google.com> <20220824023123.3060905-2-yuanyu@google.com> In-Reply-To: <20220824023123.3060905-2-yuanyu@google.com> From: "Ard Biesheuvel" Date: Mon, 5 Sep 2022 15:55:01 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 1/1] OvmfPkg/PlatformDxe: Check RouteConfig arguments for spec compliance To: Yuan Yu Cc: devel@edk2.groups.io, Ard Biesheuvel , Jordan Justen , Laszlo Ersek , Anthony Perard , Julien Grall Content-Type: text/plain; charset="UTF-8" On Wed, 24 Aug 2022 at 04:31, Yuan Yu wrote: > > Per UEFI Spec 2.9, EFI_HII_CONFIG_ROUTING_PROTOCOL.RouteConfig() > should return EFI_INVALID_PARAMETERS if caller passes in a NULL for > the Configuration parameter (see 35.4 EFI HII Configuration Routing > Protocol). > > Add a check to return EFI_INVALID_PARAMETERS when Configuration is NULL. > > Cc: Ard Biesheuvel > Cc: Jordan Justen > Cc: Laszlo Ersek > Cc: Anthony Perard > Cc: Julien Grall > > Signed-off-by: Yuan Yu > --- > OvmfPkg/PlatformDxe/Platform.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/OvmfPkg/PlatformDxe/Platform.c b/OvmfPkg/PlatformDxe/Platform.c > index a6d459f3dfd7..83dcd2216c6d 100644 > --- a/OvmfPkg/PlatformDxe/Platform.c > +++ b/OvmfPkg/PlatformDxe/Platform.c > @@ -344,7 +344,7 @@ RouteConfig ( > Configuration > )); > > - if (Progress == NULL) { > + if (Progress == NULL || Configuration == NULL) { > return EFI_INVALID_PARAMETER; > } > > -- > 2.37.2.672.g94769d06f0-goog > Merged as #3287