grub-core/fs/minix.c (grub_minix_read_file): Avoid reading past the end of file.

This commit is contained in:
Vladimir Serbinenko committed 2015-01-21 17:42:06 +01:00
1 parent af435524cd
commit 30e177a05b
3 files changed
+18 -1

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ grub_usb_bulk_maxpacket (grub_usb_device_t dev,
struct grub_usb_desc_endp *endpoint)
{
/* Use the maximum packet size given in the endpoint descriptor. */
if (dev->initialized && endpoint)
if (dev->initialized && endpoint && (unsigned int) endpoint->maxpacket)
return endpoint->maxpacket;
return 64;