public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] ShellPkg:Fix bug in FileBuffer.c
@ 2020-10-26  8:39 zhuenze
  2020-11-03  0:59 ` 回复: [edk2-devel] " gaoliming
  0 siblings, 1 reply; 4+ messages in thread
From: zhuenze @ 2020-10-26  8:39 UTC (permalink / raw)
  To: devel

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>
---
 ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c
index 5659ec9810..925d910ae2 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;
-- 
2.27.0.windows.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-06  1:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-26  8:39 [PATCH] ShellPkg:Fix bug in FileBuffer.c zhuenze
2020-11-03  0:59 ` 回复: [edk2-devel] " gaoliming
2020-11-03  5:05   ` Gao, Zhichao
2020-11-06  1:11     ` 回复: " gaoliming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox