ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c | 2 ++ 1 file changed, 2 insertions(+)
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
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66594): https://edk2.groups.io/g/devel/message/66594
Mute This Topic: https://groups.io/mt/77810838/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> > -----邮件原件----- > 发件人: bounce+27952+66594+4905953+8761045@groups.io > <bounce+27952+66594+4905953+8761045@groups.io> 代表 Enze Zhu > 发送时间: 2020年10月26日 16:40 > 收件人: devel@edk2.groups.io > 主题: [edk2-devel] [PATCH] 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> > --- > 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 > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66887): https://edk2.groups.io/g/devel/message/66887 Mute This Topic: https://groups.io/mt/77996839/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Thanks, Zhichao > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of gaoliming > Sent: Tuesday, November 3, 2020 9:00 AM > To: devel@edk2.groups.io; zhuenze@byosoft.com.cn; Gao, Zhichao > <zhichao.gao@intel.com> > Cc: gaoliming@byosoft.com.cn > Subject: 回复: [edk2-devel] [PATCH] ShellPkg:Fix bug in FileBuffer.c > > Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> > > > -----邮件原件----- > > 发件人: bounce+27952+66594+4905953+8761045@groups.io > > <bounce+27952+66594+4905953+8761045@groups.io> 代表 Enze Zhu > > 发送时间: 2020年10月26日 16:40 > > 收件人: devel@edk2.groups.io > > 主题: [edk2-devel] [PATCH] 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> > > --- > > 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 > > > > > > > > > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66909): https://edk2.groups.io/g/devel/message/66909 Mute This Topic: https://groups.io/mt/78000434/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Create PR https://github.com/tianocore/edk2/pull/1089 Thanks Liming > -----邮件原件----- > 发件人: Gao, Zhichao <zhichao.gao@intel.com> > 发送时间: 2020年11月3日 13:05 > 收件人: devel@edk2.groups.io; gaoliming@byosoft.com.cn; > zhuenze@byosoft.com.cn > 主题: RE: [edk2-devel] [PATCH] ShellPkg:Fix bug in FileBuffer.c > > Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> > > Thanks, > Zhichao > > > -----Original Message----- > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of > gaoliming > > Sent: Tuesday, November 3, 2020 9:00 AM > > To: devel@edk2.groups.io; zhuenze@byosoft.com.cn; Gao, Zhichao > > <zhichao.gao@intel.com> > > Cc: gaoliming@byosoft.com.cn > > Subject: 回复: [edk2-devel] [PATCH] ShellPkg:Fix bug in FileBuffer.c > > > > Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> > > > > > -----邮件原件----- > > > 发件人: bounce+27952+66594+4905953+8761045@groups.io > > > <bounce+27952+66594+4905953+8761045@groups.io> 代表 Enze Zhu > > > 发送时间: 2020年10月26日 16:40 > > > 收件人: devel@edk2.groups.io > > > 主题: [edk2-devel] [PATCH] 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> > > > --- > > > 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 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#67056): https://edk2.groups.io/g/devel/message/67056 Mute This Topic: https://groups.io/mt/78065266/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2024 Red Hat, Inc.