audk/ShellPkg/Library
Tormod Volden e99d532fd7 ShellPkg/UefiShellLib: Accept "0 " as valid numeric string
InternalShellIsHexOrDecimalNumber() would fail to interpret e.g. "0 " or
"00 " as valid numeric strings. After skipping the "0" digits as
leading zeroes, it would check if the next character is a valid hex or
decimal digit, which would then fail on the terminating character.

Therefore return success if "leading" zeroes have been consumed and
there are no more characters.

InternalShellStrHexToUint64() would fail to interpret e.g. "0 " or "00 "
as valid numeric strings. After skipping the "0" digits as leading
zeroes, it would find itself surprised by the following space.

Restrict the "bad space" check to the case where it had just consumed
the "x" or "X" marker. Otherwise the space is fine (depending on
StopAtSpace either end of number or interspersed space) since there
were only zeroes so far.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3080

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2024-12-16 18:34:43 +00:00
..
UefiHandleParsingLib ShellPkg: CodeQL Fixes 2024-10-29 02:09:18 +00:00
UefiShellAcpiViewCommandLib ShellPkg/AcpiView: RASF Parser 2024-10-04 17:48:11 +00:00
UefiShellBcfgCommandLib ShellPkg: CodeQL Fixes 2024-10-29 02:09:18 +00:00
UefiShellCEntryLib ShellPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiShellCommandLib ShellPkg: UefiShellCommandLib: CodeQL Fixes 2024-10-29 02:09:18 +00:00
UefiShellDebug1CommandsLib ShellPkg: CodeQL Fixes 2024-10-29 02:09:18 +00:00
UefiShellDriver1CommandsLib ShellPkg: CodeQL Fixes 2024-10-29 02:09:18 +00:00
UefiShellInstall1CommandsLib ShellPkg: Fix typos 2023-12-08 13:25:11 +00:00
UefiShellLevel1CommandsLib ShellPkg: UefiShellCommandLib: CodeQL Fixes 2024-10-29 02:09:18 +00:00
UefiShellLevel2CommandsLib ShellPkg/UefiShellLevel2CommandsLib: Add helper for reset -fwui option 2024-12-09 17:16:58 +00:00
UefiShellLevel3CommandsLib ShellPkg: CodeQL Fixes 2024-10-29 02:09:18 +00:00
UefiShellLib ShellPkg/UefiShellLib: Accept "0 " as valid numeric string 2024-12-16 18:34:43 +00:00
UefiShellNetwork1CommandsLib ShellPkg: Fix typos 2023-12-08 13:25:11 +00:00
UefiShellNetwork2CommandsLib ShellPkg: CodeQL Fixes 2024-10-29 02:09:18 +00:00