[edk2-devel] [PATCH 2/3] MdePkg/BaseLib: Base64Decode: Make DestinationSize complied to spec

Laszlo Ersek lersek at redhat.com
Mon Jul 1 11:03:48 UTC 2019


On 06/28/19 05:57, Gao, Zhichao wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1891
> 
> DestinationSize is decripted as 'Set to bytes stored on return'.
> Before return the status, set its converted bytes to be complied
> to the decriptions.
> DestinationIndex may be overflow if the *DestinationSize is bigger
> than (MAX_ADDRESS - 1). Move its incrementation under condition
> 'DestinationIndex < *DestinationSize' to make sure it wouldn't be
> overflow.
> 
> Cc: Michael D Kinney <michael.d.kinney at intel.com>
> Cc: Liming Gao <liming.gao at intel.com>
> Cc: Marvin Hauser <mhaeuser at outlook.de>
> Cc: Laszlo Ersek <lersek at redhat.com>
> Signed-off-by: Zhichao Gao <zhichao.gao at intel.com>
> ---
>  MdePkg/Library/BaseLib/String.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)

I'm going to skip this patch because, as I stated under the blurb, I
believe that the basic approach of the function implementation is wrong.

Thanks
Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43117): https://edk2.groups.io/g/devel/message/43117
Mute This Topic: https://groups.io/mt/32238989/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list