From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Thu, 05 Sep 2019 10:34:55 -0700 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E59DC10F23F6; Thu, 5 Sep 2019 17:34:54 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-133.ams2.redhat.com [10.36.116.133]) by smtp.corp.redhat.com (Postfix) with ESMTP id E543360C44; Thu, 5 Sep 2019 17:34:51 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v2] OvmfPkg/EnrollDefaultKeys: clean up Base64Decode() retval handling To: devel@edk2.groups.io, ard.biesheuvel@linaro.org Cc: Jordan Justen , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= References: <20190904075233.5005-1-lersek@redhat.com> From: "Laszlo Ersek" Message-ID: Date: Thu, 5 Sep 2019 19:34:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.66]); Thu, 05 Sep 2019 17:34:54 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 09/04/19 14:37, Ard Biesheuvel wrote: > On Wed, 4 Sep 2019 at 00:52, Laszlo Ersek wrote: >> >> Since commit 35e242b698cd ("MdePkg/BaseLib: rewrite Base64Decode()", >> 2019-07-16), Base64Decode() guarantees that DestinationSize is larger = on >> output than it was on input if RETURN_BUFFER_TOO_SMALL is returned. Cl= ean >> up the retval handling for the first Base64Decode() call in >> EnrollDefaultKeys, which used to work around the ambiguity in the prev= ious >> Base64Decode() interface contract. >> >> Cc: Ard Biesheuvel >> Cc: Jordan Justen >> Cc: Philippe Mathieu-Daud=C3=A9 >> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1981 >> Signed-off-by: Laszlo Ersek >> Reviewed-by: Philippe Mathieu-Daude >=20 > Acked-by: Ard Biesheuvel Pushed as commit 59b754c9f697. Thanks everyone! Laszlo