diff options
author | Andrew Cooper <andrew.cooper3@citrix.com> | 2012-07-03 13:50:01 +0100 |
---|---|---|
committer | Andrew Cooper <andrew.cooper3@citrix.com> | 2012-07-03 13:50:01 +0100 |
commit | 8b56609962c45064ec6e3d223c5724cc4a1e2d48 (patch) | |
tree | d6fe124bea24a3ea1a75e4db02e425316d9a9098 | |
parent | 34bf8242c649a7a69a371f4d8e418460f9bb1e97 (diff) | |
download | xen-8b56609962c45064ec6e3d223c5724cc4a1e2d48.tar.gz xen-8b56609962c45064ec6e3d223c5724cc4a1e2d48.tar.bz2 xen-8b56609962c45064ec6e3d223c5724cc4a1e2d48.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 3ce1dcc7a9..9a53c50cee 100644 --- a/xen/common/kernel.c +++ b/xen/common/kernel.c @@ -92,7 +92,7 @@ void __init 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; |