summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorTormod Volden <debian.tormod@gmail.com>2024-07-24 00:22:29 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-12-16 18:34:43 +0000
commite99d532fd7224e68026543834ed9c0fe3cfaf88c (patch)
tree7c3c485a28d5cf542b1a8ea356e43a35802780e1 /MdeModulePkg
parentd63d5884d7c2f7660175161187ce90852bc2a891 (diff)
downloadedk2-e99d532fd7224e68026543834ed9c0fe3cfaf88c.tar.gz
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>
Diffstat (limited to 'MdeModulePkg')
0 files changed, 0 insertions, 0 deletions