Fix the new kernel command-line parser syslinux-3.74-pre14
authorH. Peter Anvin <hpa@linux.intel.com>
Mon, 30 Mar 2009 23:03:30 +0000 (16:03 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Mon, 30 Mar 2009 23:03:30 +0000 (16:03 -0700)
Impact: bug fix

We were incorrectly looking at [ds:di] instead of [es:di] for
verifying that a command was properly terminated.  Fix.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
core/runkernel.inc

index b3968db..d068aa5 100644 (file)
@@ -126,9 +126,10 @@ parse_cmdline:
 
                ; This either needs to have been an option with parameter,
                ; or be followed by EOL/whitespace
-               cmp byte [di-1],'='
+               mov ax,[es:di-1]                ; AL = last chr; AH = following
+               cmp al,'='
                je .is_match
-               cmp byte [di],' '
+               cmp ah,' '
                ja .no_match
 .is_match:
                pop ax                          ; Drop option pointer on stack