diff options
author | Pierre Gondois <pierre.gondois@arm.com> | 2024-10-02 11:56:48 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-11-27 15:57:08 +0000 |
commit | bf32c2d61f3e13e8e0f33fce431376812c99da81 (patch) | |
tree | 24753c78bd44ca263f400eaa9d22e8073874d39a | |
parent | d90bf1f973cb69d18b4d994530bd4692b7fd7195 (diff) | |
download | edk2-bf32c2d61f3e13e8e0f33fce431376812c99da81.tar.gz |
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>
-rw-r--r-- | ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c b/ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c index 9cc9ed7d36..7703e52fe3 100644 --- a/ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c +++ b/ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c @@ -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);
|