From: Yu Watanabe Date: Tue, 16 Jan 2018 14:00:39 +0000 (+0900) Subject: virt: add comment that we need to use sscanf() X-Git-Tag: v237~95^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=47dbb99ad7bb2e7d06c712d9f60e767f9b12a457;p=platform%2Fupstream%2Fsystemd.git virt: add comment that we need to use sscanf() Follow-up for 13e0f9fe8334859ee86f4ff725374d1d83f5baf7. See PR #7890 and comment in PR #7581. --- diff --git a/src/basic/virt.c b/src/basic/virt.c index 9b6abf9..f4796b5 100644 --- a/src/basic/virt.c +++ b/src/basic/virt.c @@ -222,6 +222,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));