]> xenbits.xensource.com Git - xen.git/commit
xen: fix parse_bool() with empty string
authorJuergen Gross <jgross@suse.com>
Fri, 25 Aug 2017 16:11:25 +0000 (18:11 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 25 Aug 2017 19:11:16 +0000 (20:11 +0100)
commit803c5a2a42e7c72a4c848e0f0106a941b758a91f
tree321dda8d0c8151e0d2070a075e381cf15b7d4055
parent846be9ef30f3ef3b8f2ad9a0d2f7bd6025d21dc1
xen: fix parse_bool() with empty string

parse_bool() should return -1 in case it is called with an empty
string. In order to allow boolean parameters in the cmdline without
specifying a value this case must be handled in _cmdline_parse() by
always passing a value string.

This fixes commit 532dec8e31174ed450adfd36a4b0b41dec27010d ("xen:
add an optional string end parameter to parse_bool()")

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/common/kernel.c