]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg:Fix bug in FileBuffer.c
authorEnze Zhu <zhuenze@byosoft.com.cn>
Mon, 26 Oct 2020 08:39:37 +0000 (16:39 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 6 Nov 2020 01:34:11 +0000 (01:34 +0000)
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2998

In the function FileBufferCutLine(),set the CutLine pointer to NULL,
The function header specifies that the pointer is valid on a successful
or failed return code.

Signed-off-by: Enze Zhu <zhuenze@byosoft.com.cn>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c

index 5659ec981054a434f3f20bd6160651814a128e5f..925d910ae216bae508cceae9b005988edc56b608 100644 (file)
@@ -2767,6 +2767,8 @@ FileBufferCutLine (
   UINTN           Row;\r
   UINTN           Col;\r
 \r
+  *CutLine      = NULL;\r
+\r
   if (FileBuffer.ReadOnly) {\r
     StatusBarSetStatusString (L"Read Only File Can Not Be Modified");\r
     return EFI_SUCCESS;\r