From 523f48e771b1088c6e2cfddc5c56cde1ef9a2ab0 Mon Sep 17 00:00:00 2001 From: Eric Dong Date: Thu, 26 Jun 2014 03:24:25 +0000 Subject: Refine code to make it more safely. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong Reviewed-by: Feng Tian git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15598 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c | 3 ++- MdeModulePkg/Core/Pei/Dependency/Dependency.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'MdeModulePkg/Core') diff --git a/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c b/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c index b5a0d874f0..f2c0dd5de4 100644 --- a/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c +++ b/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c @@ -1,7 +1,7 @@ /** @file Implements functions to read firmware file -Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -447,6 +447,7 @@ FvReadFileSection ( if (EFI_ERROR (Status)) { return Status; } + ASSERT (FileBuffer != NULL); // // Check to see that the file actually HAS sections before we go any further. diff --git a/MdeModulePkg/Core/Pei/Dependency/Dependency.c b/MdeModulePkg/Core/Pei/Dependency/Dependency.c index d209b8d505..e71566b5a7 100644 --- a/MdeModulePkg/Core/Pei/Dependency/Dependency.c +++ b/MdeModulePkg/Core/Pei/Dependency/Dependency.c @@ -5,7 +5,7 @@ if a driver can be scheduled for execution. The criteria for schedulability is that the dependency expression is satisfied. -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -106,7 +106,7 @@ PeimDispatchReadiness ( Iterator = DependencyExpression; - StackPtr = &EvalStack[0]; + StackPtr = EvalStack; while (TRUE) { -- cgit v1.2.3