]> git.ipfire.org Git - thirdparty/grub.git/commit
commands/usbtest: Ensure string length is sufficient in usb string processing
authorJamie <volticks@gmail.com>
Mon, 14 Jul 2025 09:07:47 +0000 (10:07 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 18 Nov 2025 13:34:44 +0000 (14:34 +0100)
commit7debdce1e98907e65223a4b4c53a41345ac45e53
tree338024cfb388c7d8bdbf5eca9ca164da2f14c084
parent549a9cc372fd0b96a4ccdfad0e12140476cc62a3
commands/usbtest: Ensure string length is sufficient in usb string processing

If descstrp->length is less than 2 this will result in underflow in
"descstrp->length / 2 - 1" math. Let's fix the check to make sure the
value is sufficient.

Signed-off-by: Jamie <volticks@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/commands/usbtest.c