summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhpa <hpa>2005-06-16 05:52:44 +0000
committerhpa <hpa>2005-06-16 05:52:44 +0000
commit5aeaaa84cb331cddd257b5b97d28b375ccfbe3ec (patch)
tree3d46a1993af4526b9f42b46d4b927007abb0db33
parent9fae82c913d8980c73d705e0031703177f40b70e (diff)
downloadsyslinux-3.09-pre2.tar.gz
Change command line to 511 characters; 1023 caused .bss overrunssyslinux-3.09-pre2
-rw-r--r--NEWS4
-rw-r--r--config.inc2
-rw-r--r--runkernel.inc4
3 files changed, 6 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index e92151fb..e6197e45 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,8 @@ them.
Changes in 3.09:
* gcc4 compilation fix.
* <BEL> (Ctrl-G) in message files now causes a beep.
+ * Reduce the command line to 511 characters; 1023 caused
+ memory overflows.
Changes in 3.08:
* SYSLINUX: Fix performance regression (-s mode always
@@ -24,7 +26,7 @@ Changes in 3.08:
BIOS flash programs.
* COM32 module to boot Multiboot systems, including Xen. See
com32/modules/mboot.doc.
- * Max command line changed to 1024 characters. Note that the
+ * Max command line changed to 1023 characters. Note that the
kernel proper still can only handle 255 characters without
patching, and COM16 binaries can only handle 125 characters.
diff --git a/config.inc b/config.inc
index cd83b7d0..bb87f34d 100644
--- a/config.inc
+++ b/config.inc
@@ -20,7 +20,7 @@
%ifndef _CONFIG_INC
%define _CONFIG_INC
-max_cmd_len equ 1023 ; Must be odd; 255 is the kernel limit
+max_cmd_len equ 511 ; Must be &3; 255 is the kernel limit
HIGHMEM_MAX equ 037FFFFFFh ; DEFAULT highest address for an initrd
DEFAULT_BAUD equ 9600 ; Default baud rate for serial port
BAUD_DIVISOR equ 115200 ; Serial port parameter
diff --git a/runkernel.inc b/runkernel.inc
index f73998e5..b18ef1a7 100644
--- a/runkernel.inc
+++ b/runkernel.inc
@@ -337,7 +337,7 @@ need_high_cmdline:
;
; Copy command line up to 90000h
;
- mov ax,9000h
+ mov ax,9000h ; Note AL <- 0
mov es,ax
mov si,cmd_line_here
mov di,si
@@ -350,7 +350,7 @@ need_high_cmdline:
mov cx,255 ; Protocol < 0x202 has 255 as hard limit
.len_ok:
fs rep movsb
- fs stosb ; Final null, note AL == 0 here
+ stosb ; Final null, note AL == 0 already
push fs
pop es