Star,
Thanks for the comments. It's a good suggestion. I didn't know ReallocatePool()
can do that.
Thanks
Jian
> -Original Message-
> From: Zeng, Star
> Sent: Friday, November 03, 2017 5:14 PM
> To: Wang, Jian J ; edk2-devel@lists.01.org
> Cc: Dong, Eric
AllocateCopyPool(AllocationSize, *Buffer) will copy "AllocationSize" bytes of
memory from old "Buffer" to new allocated one. If "AllocationSize" is bigger
than size of "Buffer", heap memory overflow occurs during copy.
The solution is to allocate pool first then copy the necessary bytes to new
2 matches
Mail list logo