+2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/bus/usb/usbtrans.c (grub_usb_bulk_maxpacket): Avoid
+ potentially returning 0.
+
+2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/fs/minix.c (grub_minix_read_file): Avoid reading past
+ the end of file.
+
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/fshelp.c (grub_fshelp_read_file): Don't attempt to read
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;
grub_uint32_t posblock;
grub_uint32_t blockoff;
+ if (pos > GRUB_MINIX_INODE_SIZE (data))
+ {
+ grub_error (GRUB_ERR_OUT_OF_RANGE,
+ N_("attempt to read past the end of file"));
+ return -1;
+ }
+
/* Adjust len so it we can't read past the end of the file. */
if (len + pos > GRUB_MINIX_INODE_SIZE (data))
len = GRUB_MINIX_INODE_SIZE (data) - pos;