|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-4.1-testing] xen: Fix off-by-one error when parsing command line arguments
# HG changeset patch
# User Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
# Date 1341319801 -3600
# Node ID 3fed2c0a282acbca71d72e89c1d067f4f8c951e9
# Parent ce1b489f05436edd1285939c0c65157e5ef9fd96
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@xxxxxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
xen-unstable changeset: 25587:2cffb7bf6e57
xen-unstable date: Tue Jul 03 13:38:19 2012 +0100
---
diff -r ce1b489f0543 -r 3fed2c0a282a xen/common/kernel.c
--- a/xen/common/kernel.c Tue Jul 03 13:49:32 2012 +0100
+++ b/xen/common/kernel.c Tue Jul 03 13:50:01 2012 +0100
@@ -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;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |