aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/kernel.c
diff options
context:
space:
mode:
authorAndrew Cooper <andrew.cooper3@citrix.com>2012-07-03 13:38:19 +0100
committerAndrew Cooper <andrew.cooper3@citrix.com>2012-07-03 13:38:19 +0100
commit97d39c5fbf23ea2c798b814893ffd2b0239ba44b (patch)
tree62b653b2aa0342cc89b9c9abbb133042f8a61ac0 /xen/common/kernel.c
parent5dd2cbfba50238b262b3b6712cff6ce16d8fb95d (diff)
downloadxen-97d39c5fbf23ea2c798b814893ffd2b0239ba44b.tar.gz
xen-97d39c5fbf23ea2c798b814893ffd2b0239ba44b.tar.bz2
xen-97d39c5fbf23ea2c798b814893ffd2b0239ba44b.zip
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>
Diffstat (limited to 'xen/common/kernel.c')
-rw-r--r--xen/common/kernel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/common/kernel.c b/xen/common/kernel.c
index 91dc32eedf..c915bbcb65 100644
--- a/xen/common/kernel.c
+++ b/xen/common/kernel.c
@@ -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;