Revision: 18386
http://sourceforge.net/p/edk2/code/18386
Author: hwu1225
Date: 2015-09-02 08:32:00 +0000 (Wed, 02 Sep 2015)
Log Message:
-----------
Add more strict check for MOR variable, besides MOR lock variable.
(Sync patch r18383 from main trunk.)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <[email protected]>
Reviewed-by: "Zhang, Chao B" <[email protected]>
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/18383
Modified Paths:
--------------
branches/UDK2015/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.c
Modified:
branches/UDK2015/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.c
===================================================================
---
branches/UDK2015/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.c
2015-09-02 08:12:39 UTC (rev 18385)
+++
branches/UDK2015/SecurityPkg/Tcg/MemoryOverwriteRequestControlLock/TcgMorLock.c
2015-09-02 08:32:00 UTC (rev 18386)
@@ -144,19 +144,20 @@
}
//
+ // Delete not OK
+ //
+ if ((DataSize != sizeof(UINT8)) || (Data == NULL) || (Attributes == 0)) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ //
// check format
//
if (IsMorLockVariable(VariableName, VendorGuid)) {
//
- // Delete not OK
- //
- if ((DataSize == 0) || (Data == NULL) || (Attributes == 0)) {
- return EFI_INVALID_PARAMETER;
- }
- //
// set to any other value not OK
//
- if ((DataSize != sizeof(UINT8)) || ((*(UINT8 *)Data != 1) && (*(UINT8
*)Data != 0))) {
+ if ((*(UINT8 *)Data != 1) && (*(UINT8 *)Data != 0)) {
return EFI_INVALID_PARAMETER;
}
}
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits