audk/ShellPkg
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
..
Application ShellPkg: Fix check on OldArgv in UpdateArgcArgv() 2024-11-24 17:15:24 +00:00
DynamicCommand ShellPkg: DynamicCommand: CodeQL Fixes 2024-10-29 02:09:18 +00:00
Include ShellPkg: Fix typos 2023-12-08 13:25:11 +00:00
Library ShellPkg/UefiShellLib: Accept "0 " as valid numeric string 2024-12-16 18:34:43 +00:00
ShellPkg.ci.yaml ShellPkg/ShellPkg.ci.yaml: Add PrEval CI config 2024-09-02 23:20:35 +00:00
ShellPkg.dec ShellPkg: Increase PcdShellPrintBufferSize from UINT16 to UINT32 2023-10-17 03:04:05 +00:00
ShellPkg.dsc MdePkg: MdeLibs.dsc.inc: Apply StackCheckLibNull to All Module Types 2024-11-13 21:01:46 +00:00