audk/MdePkg/Library/UefiDevicePathLib
John Baldwin a859f4fc03 MdePkg: Fix a buffer overread.
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>
2024-09-03 04:09:19 +00:00
..
DevicePathFromText.c MdePkg: Fix some spelling mistakes found by cspell 2024-08-01 19:53:47 +00:00
DevicePathToText.c MdePkg: Fix a buffer overread. 2024-09-03 04:09:19 +00:00
DevicePathUtilities.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DevicePathUtilitiesBase.c MdePkg/UefiDevicePathLib: Add support for PEIMs 2022-07-23 02:11:31 +00:00
DevicePathUtilitiesDxeSmm.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiDevicePathLib.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiDevicePathLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiDevicePathLib.inf
UefiDevicePathLib.uni
UefiDevicePathLibBase.inf MdePkg/UefiDevicePathLib: Add support for PEIMs 2022-07-23 02:11:31 +00:00
UefiDevicePathLibOptionalDevicePathProtocol.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiDevicePathLibOptionalDevicePathProtocol.inf
UefiDevicePathLibOptionalDevicePathProtocol.uni
UefiDevicePathLibStandaloneMm.inf MdePkg/Library/UefiDevicePathLib: Add back StandaloneMm INF file 2022-08-10 21:43:49 +00:00