ArmPkg/SemihostFs: StrSize() cannot return 0

StrSize() account the terminating NULL character and cannot return 0.
Replace StrSize() StrLen().

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4859
Reported-by: Tormod Volden <debian.tormod@gmail.com>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
This commit is contained in:
Pierre Gondois 2024-10-02 11:56:48 +02:00 committed by mergify[bot]
parent d90bf1f973
commit bf32c2d61f

View File

@ -1158,7 +1158,7 @@ FileSetInfo (
Buffer = SystemInfo->VolumeLabel;
if (StrSize (Buffer) > 0) {
if (StrLen (Buffer) > 0) {
VolumeLabel = AllocateCopyPool (StrSize (Buffer), Buffer);
if (VolumeLabel != NULL) {
FreePool (mSemihostFsLabel);