Daniel Axtens 27a79bf38e disk/lvm: Don't blast past the end of the circular metadata buffer
This catches at least some OOB reads, and it's possible I suppose that
if 2 * mda_size is less than GRUB_LVM_MDA_HEADER_SIZE it might catch some
OOB writes too (although that hasn't showed up as a crash in fuzzing yet).

It's a bit ugly and I'd appreciate better suggestions.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2021-03-02 15:54:18 +01:00
..
2019-03-25 15:14:52 +01:00
2019-03-25 15:14:52 +01:00
2019-03-25 15:14:52 +01:00
2020-07-29 16:55:47 +02:00
2019-03-25 15:14:52 +01:00
2019-03-25 15:14:52 +01:00
2012-03-26 16:10:40 +02:00
2019-03-25 15:14:52 +01:00
2019-03-25 15:14:52 +01:00