diff options
author | Andrew Cooper <andrew.cooper3@citrix.com> | 2012-07-03 13:51:14 +0100 |
---|---|---|
committer | Andrew Cooper <andrew.cooper3@citrix.com> | 2012-07-03 13:51:14 +0100 |
commit | 6059c860c585370fff466ae998ee9e1564dfb003 (patch) | |
tree | ad22ab42f134c2875175410af4ba24658f367b19 | |
parent | 6f51d98fe6d1df70ebbfa5d37b3505c48d69e569 (diff) | |
download | xen-6059c860c585370fff466ae998ee9e1564dfb003.tar.gz xen-6059c860c585370fff466ae998ee9e1564dfb003.tar.bz2 xen-6059c860c585370fff466ae998ee9e1564dfb003.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>
xen-unstable changeset: 25587:2cffb7bf6e57
xen-unstable date: Tue Jul 03 13:38:19 2012 +0100
-rw-r--r-- | xen/common/kernel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/common/kernel.c b/xen/common/kernel.c index f45fb9ab36..d85d4d9b73 100644 --- a/xen/common/kernel.c +++ b/xen/common/kernel.c @@ -68,7 +68,7 @@ void cmdline_parse(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; |