Reviewed-by: Qin Long <[email protected]>
Best Regards & Thanks, LONG, Qin > -----Original Message----- > From: Laszlo Ersek [mailto:[email protected]] > Sent: Thursday, February 25, 2016 5:14 AM > To: edk2-devel-01 > Cc: Cecil Sheng; Cinnamon Shia; Daryl McDaniel; David Woodhouse; Dong, > Eric; Carsey, Jaben; Gao, Liming; Long, Qin; Qiu, Shumin; Samer El-Haj- > Mahmoud; Ye, Ting; Yao, Jiewen; Zhu, Yonghong > Subject: [PATCH 0/4] free(NULL) and realloc(NULL, size) conformance > improvements > > 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/OnigurumaUe > fiPort.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/OnigurumaUe > fiPort.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

