]> git.ipfire.org Git - thirdparty/systemd.git/commit
Fix parsing of features in detect_vm_xen_dom0 (#7890)
authorOlaf Hering <olaf@aepfle.de>
Tue, 16 Jan 2018 09:24:37 +0000 (10:24 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 16 Jan 2018 09:24:37 +0000 (20:24 +1100)
commit13e0f9fe8334859ee86f4ff725374d1d83f5baf7
treebe5a88ba148b2db0fa943455a1742053f5553cca
parent4579e8ef313efe56f99a4bdd43439c508a6d49ce
Fix parsing of features in detect_vm_xen_dom0 (#7890)

Use sscanf instead of the built-in safe_atolu because the scanned string
lacks the leading "0x", it is generated with snprintf(b, "%08x", val).
As a result strtoull handles it as octal, and parsing fails.

The initial submission already used sscanf, then parsing was replaced by
safe_atolu without retesting the updated PR.

Fixes 575e6588d ("virt: use XENFEAT_dom0 to detect the hardware domain
(#6442, #6662) (#7581)")
src/basic/virt.c