summaryrefslogtreecommitdiff
path: root/lib/variables.c
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javierm@redhat.com>2020-09-08 12:26:45 +0200
committerPeter Jones <pjones@redhat.com>2020-09-09 15:56:39 -0400
commit74b05de7d19fa4f462b6e228a8a03f8ee242b673 (patch)
tree8b7d51fa9ec753ddbfb31902173c2a830a3f3a85 /lib/variables.c
parent63f7943dbe0583dd0bf89ee8fe8230d4b7373b91 (diff)
downloadefi-boot-shim-74b05de7d19fa4f462b6e228a8a03f8ee242b673.tar.gz
efi-boot-shim-74b05de7d19fa4f462b6e228a8a03f8ee242b673.zip
Fix buffer overrun due DEFAULT_LOADER length miscalculation
The DEFAULT_LOADER is a UCS-2 string and the StrLen() function returns the number of UCS-2 encoded characters in the string. But the allocated memory is in bytes, so only half of the needed memory to store it is allocated. This leads to a buffer overrun when the StrCpy() function attempts to copy the DEFAULT_LOADER to the allocated buffer. Fixes: 354bd9b1931 ("Actually check for errors from set_second_stage()") Reported-by: Stuart Hayes <stuart_hayes@dell.com> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Diffstat (limited to 'lib/variables.c')
0 files changed, 0 insertions, 0 deletions