ShellPkg/Library/UefiShellLib/UefiShellLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com>
---
ShellPkg/Library/UefiShellLib/UefiShellLib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ShellPkg/Library/UefiShellLib/UefiShellLib.c b/ShellPkg/Library/UefiShellLib/UefiShellLib.c
index 55e8a67..0f37886 100644
--- a/ShellPkg/Library/UefiShellLib/UefiShellLib.c
+++ b/ShellPkg/Library/UefiShellLib/UefiShellLib.c
@@ -702,7 +702,7 @@ ShellOpenFileByName(
// Create the directory to create the file in
//
FileNameCopy = AllocateCopyPool (StrSize (FileName), FileName);
- if (FileName == NULL) {
+ if (FileNameCopy == NULL) {
return (EFI_OUT_OF_RESOURCES);
}
PathCleanUpDirectories (FileNameCopy);
--
2.7.4
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jeff > Westfahl > Sent: Friday, May 12, 2017 1:42 PM > To: edk2-devel@lists.01.org > Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Carsey, Jaben <jaben.carsey@intel.com> > Subject: [edk2] [PATCH] ShellPkg/UefiShellLib: Check correct variable for NULL > Importance: High > > Cc: Ruiyu Ni <ruiyu.ni@intel.com> > Cc: Jaben Carsey <jaben.carsey@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com> > --- > ShellPkg/Library/UefiShellLib/UefiShellLib.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ShellPkg/Library/UefiShellLib/UefiShellLib.c > b/ShellPkg/Library/UefiShellLib/UefiShellLib.c > index 55e8a67..0f37886 100644 > --- a/ShellPkg/Library/UefiShellLib/UefiShellLib.c > +++ b/ShellPkg/Library/UefiShellLib/UefiShellLib.c > @@ -702,7 +702,7 @@ ShellOpenFileByName( > // Create the directory to create the file in > // > FileNameCopy = AllocateCopyPool (StrSize (FileName), FileName); > - if (FileName == NULL) { > + if (FileNameCopy == NULL) { > return (EFI_OUT_OF_RESOURCES); > } > PathCleanUpDirectories (FileNameCopy); > -- > 2.7.4 > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
© 2016 - 2024 Red Hat, Inc.