mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 15:22:39 +00:00
* 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.
This commit is contained in:
1 parent
4685200fa9
commit
e25f8e1f37
2 files changed
+12
No files matched your search
@@ -1,3 +1,8 @@
|
|||||||
|
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>
|
2013-11-02 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* util/grub-mount.c: Handle symlinks to directories.
|
* util/grub-mount.c: Handle symlinks to directories.
|
||||||
|
|||||||
@@ -382,11 +382,18 @@ grub_reed_solomon_recover (void *ptr_, grub_size_t s, grub_size_t rs)
|
|||||||
{
|
{
|
||||||
gf_single_t *ptr = ptr_;
|
gf_single_t *ptr = ptr_;
|
||||||
gf_single_t *rptr = ptr + s;
|
gf_single_t *rptr = ptr + s;
|
||||||
|
grub_uint8_t *cptr;
|
||||||
|
|
||||||
/* Nothing to do. */
|
/* Nothing to do. */
|
||||||
if (!rs)
|
if (!rs)
|
||||||
return;
|
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 ();
|
init_powx ();
|
||||||
|
|
||||||
while (s > 0)
|
while (s > 0)
|
||||||
|
|||||||
Reference in new issue
Block a user