summaryrefslogtreecommitdiffstats
path: root/MdePkg/MdePkg.dec
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-10-03 15:47:08 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-09-03 04:09:19 +0000
commita859f4fc0397ec4a9d1af016b7e1f03ccf14b605 (patch)
treeb4bd7e475dd2e6806c48afe4aafd82d9e079e405 /MdePkg/MdePkg.dec
parent909849be87a7f931f9fb627522cc664c06987712 (diff)
downloadedk2-a859f4fc0397ec4a9d1af016b7e1f03ccf14b605.tar.gz
edk2-a859f4fc0397ec4a9d1af016b7e1f03ccf14b605.tar.bz2
edk2-a859f4fc0397ec4a9d1af016b7e1f03ccf14b605.zip
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>
Diffstat (limited to 'MdePkg/MdePkg.dec')
0 files changed, 0 insertions, 0 deletions