Reed-Solomon recovery if more than half of redundancy info is 0.
+2013-11-02 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/lib/reed_solomon.c (grub_reed_solomon_recover): Don't do
+ Reed-Solomon recovery if more than half of redundancy info is 0.
+
2013-11-02 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-mount.c: Handle symlinks to directories.
{
gf_single_t *ptr = ptr_;
gf_single_t *rptr = ptr + s;
+ grub_uint8_t *cptr;
/* Nothing to do. */
if (!rs)
return;
+ for (cptr = rptr + rs - 1; cptr >= rptr; cptr--)
+ if (*cptr)
+ break;
+ if (rptr + rs - 1 - cptr > (grub_ssize_t) rs / 2)
+ return;
+
init_powx ();
while (s > 0)