The free() wrapper in BaseCryptLib has a bug that has been triggered by David's recent OpenSSL work. The series fixes the bug, plus more instances of the same.
Here not only those free() and realloc() functions should be mentioned that this series patches, but also those that are *not* patched. Let's see the untouched free() implementations: - StdLib/LibC/StdLib/Malloc.c: Handles NULL correctly. - BaseTools/Source/C/Common/MyAlloc.[hc]: The MyFree() function handles NULL correctly. The untouched realloc() implementations: - StdLib/LibC/StdLib/Malloc.c: Handles NULL correctly. - MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/OnigurumaUefiPort.h: The prototype of realloc() differs from the one seen in standard C. - CryptoPkg/Library/BaseCryptLib/SysCall/BaseMemAllocation.c: For a NULL pointer, the current implementation (i.e., calling ReallocatePool (size, size, NULL)) conforms to the ReallocatePool() specification, and has the intended effect. - BaseTools/Source/C/Common/MyAlloc.[hc]: The MyRealloc() function handles NULL correctly. Thanks Laszlo Cc: Cecil Sheng <[email protected]> Cc: Cinnamon Shia <[email protected]> Cc: Daryl McDaniel <[email protected]> Cc: David Woodhouse <[email protected]> Cc: Eric Dong <[email protected]> Cc: Jaben Carsey <[email protected]> Cc: Liming Gao <[email protected]> Cc: Qin Long <[email protected]> Cc: Qiu Shumin <[email protected]> Cc: Samer El-Haj-Mahmoud <[email protected]> Cc: Ting Ye <[email protected]> Cc: Yao Jiewen <[email protected]> Cc: Yonghong Zhu <[email protected]> Laszlo Ersek (4): CryptoPkg: BaseCryptLib: support free(NULL) CryptoPkg: RuntimeCryptLib: support free(NULL) CryptoPkg: RuntimeCryptLib: support realloc(NULL, size) MdeModulePkg: RegularExpressionDxe: support free(NULL) MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/OnigurumaUefiPort.h | 12 +++++++++++- CryptoPkg/Library/BaseCryptLib/SysCall/BaseMemAllocation.c | 8 +++++++- CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c | 12 +++++++++++- 3 files changed, 29 insertions(+), 3 deletions(-) -- 1.8.3.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

