Fix clobber of the command line when using F-keys+LSS graphics
authorH. Peter Anvin <hpa@zytor.com>
Fri, 15 May 2009 23:24:34 +0000 (16:24 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Fri, 15 May 2009 23:26:33 +0000 (16:26 -0700)
Fix a half-entered command line when getting clobbered when pressing
an F key that in turn invokes an LSS graphic.  This was used by
duplexing the command line buffer as LSS decompression space.

Allocate a separate buffer, but move the legacy graphic variables to
.bss2 to avoid overflow.

Reported-by: Михаил <from.miha@gmail.com>
Debugged-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
core/graphics.inc

index 2b8290f..3ba5146 100644 (file)
@@ -308,7 +308,7 @@ linear_color        db 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0
                ; of this byte.
 UsingVGA       db 0
 
-               section .bss1
+               section .bss2
                alignb 4
 LSSHeader      equ $
 LSSMagic       resd 1                  ; Magic number
@@ -326,6 +326,5 @@ VGAFileBuf  resb FILENAME_MAX       ; Unmangled VGA image name
 VGAFileBufEnd  equ $
 VGAFileMBuf    resb FILENAME_MAX       ; Mangled VGA image name
 
-; We need a buffer of 640+80 bytes.  At this point, command_line should
-; not be in use, so use that buffer.
-VGARowBuffer   equ command_line
+               alignb 4
+VGARowBuffer   resb 640+80             ; Decompression buffer