(grub_udf_read_symlink): Handle read_string failure.
+2012-05-12 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/fs/udf.c (read_string): Bail out on size=0.
+ (grub_udf_read_symlink): Handle read_string failure.
+
2012-05-12 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/emu/hostdisk.c (read_device_map): Improve TRANSLATORS
grub_uint16_t *utf16 = NULL;
grub_size_t utf16len = 0;
+ if (sz == 0)
+ return NULL;
+
if (raw[0] != 8 && raw[0] != 16)
return NULL;
/* in 4 + n bytes. out, at most: 1 + 2 * n bytes. */
if (optr != out)
*optr++ = '/';
- read_string (ptr + 4, s - 4, optr);
+ if (!read_string (ptr + 4, s - 4, optr))
+ goto fail;
optr += grub_strlen (optr);
break;
default: