mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
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>