Files
xen/tools
Roger Pau Monne 3453aa3f86 x86/hvmloader: adjust strtoll() to parse hex numbers without 0x prefix
The current strtoll() implementation in hvmloader requires hex number to be
prefixed with 0x, otherwise strtoll() won't parse them correctly even when
calling the function with base == 16.

Fix this by not unconditionally setting the base to 10 when the string is
not 0 prefixed, this also allows parsing octal numbers not 0 prefixed.
While there also handle '0X' as a valid hex number prefix, together with
'0x'.

No functional change intended to the existing call sites.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2025-07-24 13:11:23 +02:00
..
2024-09-04 16:06:21 +02:00
2025-07-22 08:51:24 +02:00
2024-05-15 19:59:52 +01:00
2025-07-22 08:51:24 +02:00
2025-06-02 10:31:21 +02:00
2025-06-02 10:31:21 +02:00
2025-06-02 10:31:21 +02:00
2025-06-02 10:31:21 +02:00
2025-06-02 10:31:21 +02:00