Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:Update
xen.12882
parse_boolean-NULL-end.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File parse_boolean-NULL-end.patch of Package xen.12882
cmdline: fix parse_boolean() for NULL incoming end pointer Use the calculated lengths instead of pointers, as 'e' being NULL will otherwise cause undue parsing failures. Reported-by: Karl Johnson <karljohnson.it@gmail.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> --- sle12sp2.orig/xen/common/kernel.c 2018-03-28 16:33:59.000000000 +0200 +++ sle12sp2/xen/common/kernel.c 2018-07-16 10:36:03.000000000 +0200 @@ -193,10 +193,11 @@ int parse_boolean(const char *name, cons char buf[8]; s += nlen + 1; - if ( e <= s || e - s >= ARRAY_SIZE(buf) ) + slen -= nlen + 1; + if ( slen >= ARRAY_SIZE(buf) ) return -1; - memcpy(buf, s, e - s); - buf[e - s] = 0; + memcpy(buf, s, slen); + buf[slen] = 0; return parse_bool(buf); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor