mirror of https://github.com/acidanthera/audk.git
DevPathToTextUsbWWID allocates a separate copy of the SerialNumber string to append a null terminator if the original string is not null terminated. However, by using AllocateCopyPool, it tries to copy 'Length + 1' words from the existing string containing 'Length' characters into the target string. Split the copy out to only copy 'Length' characters instead. This was reported by GCC's -Wstringop-overread when compiling a copy of this routine included in a library on FreeBSD. Signed-off-by: John Baldwin <jhb@FreeBSD.org> |
||
---|---|---|
.. | ||
DevicePathFromText.c | ||
DevicePathToText.c | ||
DevicePathUtilities.c | ||
DevicePathUtilitiesBase.c | ||
DevicePathUtilitiesDxeSmm.c | ||
UefiDevicePathLib.c | ||
UefiDevicePathLib.h | ||
UefiDevicePathLib.inf | ||
UefiDevicePathLib.uni | ||
UefiDevicePathLibBase.inf | ||
UefiDevicePathLibOptionalDevicePathProtocol.c | ||
UefiDevicePathLibOptionalDevicePathProtocol.inf | ||
UefiDevicePathLibOptionalDevicePathProtocol.uni | ||
UefiDevicePathLibStandaloneMm.inf |