Reviewed-by: Vladimir Serbinenko<phco...@gmail.com> Le ven. 23 juin 2023, 00:08, Daniel Kiper <daniel.ki...@oracle.com> a écrit :
> Most of leftover code blindly assumes > GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT > divisibility by 8. So, enforce this at compile time. > > Signed-off-by: Daniel Kiper <daniel.ki...@oracle.com> > --- > grub-core/lib/relocator.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/grub-core/lib/relocator.c b/grub-core/lib/relocator.c > index 725bca7c3..568fc0b8f 100644 > --- a/grub-core/lib/relocator.c > +++ b/grub-core/lib/relocator.c > @@ -478,6 +478,8 @@ malloc_in_range (struct grub_relocator *rel, > > #if GRUB_RELOCATOR_HAVE_LEFTOVERS > { > + COMPILE_TIME_ASSERT (GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT % 8 == 0); > + > struct grub_relocator_fw_leftover *cur; > for (cur = leftovers; cur; cur = cur->next) > { > -- > 2.11.0 > >
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel