]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Zero out CacheBuffer in FatInitializeDiskCache after allocated.
authorStar Zeng <star.zeng@intel.com>
Mon, 24 Dec 2012 02:42:01 +0000 (02:42 +0000)
committerJordan Justen <jordan.l.justen@intel.com>
Thu, 7 Apr 2016 06:22:43 +0000 (23:22 -0700)
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
(based on FatPkg commit b67d81497c36565dba57c7cac308b2f47668a60e)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
FatPkg/EnhancedFatDxe/DiskCache.c

index 55a7c67be557b52a82a7f9c99f818bbdddc6944a..9f527289a847bbf9b8b194ab7ed7719061a51fe0 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2005 - 2007, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available\r
 under the terms and conditions of the BSD License which accompanies this\r
 distribution. The full text of the license may be found at\r
@@ -529,7 +529,7 @@ Returns:
   //\r
   // Allocate the Fat Cache buffer\r
   //\r
-  CacheBuffer = AllocatePool (FatCacheSize + DataCacheSize);\r
+  CacheBuffer = AllocateZeroPool (FatCacheSize + DataCacheSize);\r
   if (CacheBuffer == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r