]> git.proxmox.com Git - mirror_edk2.git/commit - ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c
ShellPkg/editor: Fix system hang when console max column > 200
authorRuiyu Ni <ruiyu.ni@intel.com>
Thu, 19 Oct 2017 06:14:33 +0000 (14:14 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Mon, 23 Oct 2017 07:04:18 +0000 (15:04 +0800)
commit1a421c2c173adece66f3c24f6d1cfb2ae5cee9cb
tree34b793baef2204e4e16e687cffc338a3de45960f
parentb9e5df433641dfe7c597bfb7b15f2cce64e01e5b
ShellPkg/editor: Fix system hang when console max column > 200

EditorClearLine() assumes the console max column is less than 200.
When the max column is bigger than 200, the code incorrectly
modifies the content out side of Line buffer.
It may cause system hang or reset.

The patch changes the function to print several times when
the max column is bigger than 200.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c