mirror_edk2/ShellPkg/Library
Michael Kinney c0b7e2b2bf ShellPkg/Hexedit: Fix FreePool() ASSERT() when writing disk
The HDiskImageSave() function copies a device path using
DuplicateDevicePath() and passes that device path to
gBS->LocateDevicePath() that changes the value of the
device path pointer.  When FreePool() is called with the
modified device path pointer, the FreePool() service
generates an ASSERT() because the signature for the pool
head can not be found.

The function HDiskImageRead() immediately above
HDiskImageSave() has the correct algorithm that uses an
additional local variable called DupDevicePathForFree to
preserve the pointer to the allocated buffer so it can
be used in the call to FreePool().

Bug: <https://bugzilla.tianocore.org/show_bug.cgi?id=131>

Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
2016-10-03 15:05:40 -07:00
..
UefiDpLib ShellPkg/Dp: Handle memory allocation failure 2016-07-18 10:55:08 +08:00
UefiHandleParsingLib ShellPkg/UefiHandleParsingLib: fix retval for empty child controller array 2016-09-08 20:43:37 +02:00
UefiShellBcfgCommandLib ShellPkg: Add check for "dump" parameter in "bcfg" command 2016-09-01 16:38:06 +08:00
UefiShellCEntryLib ShellPkg: Refine the fomat in INF/DEC files to follow spec. 2015-01-22 01:44:11 +00:00
UefiShellCommandLib ShellPkg: Remove current working dir path ".;" from 'path' variable 2016-09-22 14:17:34 -07:00
UefiShellDebug1CommandsLib ShellPkg/Hexedit: Fix FreePool() ASSERT() when writing disk 2016-10-03 15:05:40 -07:00
UefiShellDriver1CommandsLib ShellPkg: Update help output for disconnect command 2016-09-23 10:39:42 -07:00
UefiShellInstall1CommandsLib Revert "ShellPkg : Add UEFI_APPLICATION module type to UefiShellInstall1CommandsLib.inf" 2016-01-06 16:23:20 +00:00
UefiShellLevel1CommandsLib ShellPkg/If: Fix issue to pass static code checker 2016-07-25 10:20:13 +08:00
UefiShellLevel2CommandsLib ShellPkg/Ls: Handle the case when SearchString is NULL 2016-08-17 13:44:51 +08:00
UefiShellLevel3CommandsLib ShellPkg: Enhance 'cls' command to change the background and foreground colors 2016-09-26 13:10:31 -07:00
UefiShellLib ShellPkg: Expand special output file to include "NULL" and case insensitive 2016-09-22 14:17:24 -07:00
UefiShellNetwork1CommandsLib ShellPkg/IfConfig: Handle memory allocation failure 2016-07-18 11:04:13 +08:00
UefiShellNetwork2CommandsLib ShellPkg/Ping6: Handle memory allocation failure 2016-07-18 11:04:22 +08:00
UefiShellTftpCommandLib ShellPkg-UefiShellTftpCommandLib: Replace compiler builtin 2016-08-10 12:56:37 +08:00