xen: Fix off-by-one error when parsing command line arguments

As Xen currently stands, it will attempt to interpret the first few
bytes of the initcall section as a struct kernel_param.

The reason that this not caused problems is because in the overflow
case, param->name is actually a function pointer to the first
initcall, and intepreting it as string is very unlikely to match an
ASCII command line parameter name.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
This commit is contained in:
Andrew Cooper committed 2012-07-03 13:38:19 +01:00
1 parent 5dd2cbfba5
commit 97d39c5fbf
1 file changed
+1 -1
+1 -1
View File
@@ -90,7 +90,7 @@ void __init cmdline_parse(const char *cmdline)
if ( !bool_assert )
optkey += 3;
for ( param = &__setup_start; param <= &__setup_end; param++ )
for ( param = &__setup_start; param < &__setup_end; param++ )
{
if ( strcmp(param->name, optkey) )
continue;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.