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;