diff options
author | Enze Zhu <zhuenze@byosoft.com.cn> | 2020-10-26 16:39:37 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-11-06 01:34:11 +0000 |
commit | d00719485f6d2be3b84d076a1bd3b7f96000a57f (patch) | |
tree | d414d868f25edb0a1a3857ea4a2fd9d8498e2798 /ShellPkg/Library | |
parent | 09af9bd9be2d3e31bba979f8cf6446017b0b863e (diff) | |
download | edk2-d00719485f6d2be3b84d076a1bd3b7f96000a57f.zip edk2-d00719485f6d2be3b84d076a1bd3b7f96000a57f.tar.gz edk2-d00719485f6d2be3b84d076a1bd3b7f96000a57f.tar.bz2 |
ShellPkg:Fix bug in FileBuffer.c
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>
Diffstat (limited to 'ShellPkg/Library')
-rw-r--r-- | ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c index 5659ec9..925d910 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c @@ -2767,6 +2767,8 @@ FileBufferCutLine ( UINTN Row;
UINTN Col;
+ *CutLine = NULL;
+
if (FileBuffer.ReadOnly) {
StatusBarSetStatusString (L"Read Only File Can Not Be Modified");
return EFI_SUCCESS;
|