diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-01-16 23:00:39 +0900 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-05-30 07:50:09 +0200 |
commit | f1eacb3a95b1c9ed8869cdc3345546fba266f170 (patch) | |
tree | f7b52ab77c9d61f27f05077cb036ad4944121949 /src/basic/virt.c | |
parent | 6d5c028379f9bdd03f561ef3494f4936f75edb92 (diff) |
virt: add comment that we need to use sscanf()
Follow-up for 13e0f9fe8334859ee86f4ff725374d1d83f5baf7.
See PR #7890 and comment in PR #7581.
Diffstat (limited to 'src/basic/virt.c')
-rw-r--r-- | src/basic/virt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/virt.c b/src/basic/virt.c index 4c3791381..bb6b70f98 100644 --- a/src/basic/virt.c +++ b/src/basic/virt.c @@ -223,6 +223,8 @@ static int detect_vm_xen_dom0(void) { if (r == 0) { unsigned long features; + /* Here, we need to use sscanf() instead of safe_atoul() + * as the string lacks the leading "0x". */ r = sscanf(domcap, "%lx", &features); if (r == 1) { r = !!(features & (1U << XENFEAT_dom0)); |