at compile time that enough of scratch size is available.
+2013-11-22 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/disk/i386/pc/biosdisk.c (grub_biosdisk_open): Ensure
+ at compile time that enough of scratch size is available.
+
2013-11-22 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/x86_64/efi/callwrap.S: Fix stack alignment.
disk->total_sectors = total_sectors;
/* Limit the max to 0x7f because of Phoenix EDD. */
disk->max_agglomerate = 0x7f >> GRUB_DISK_CACHE_BITS;
+ COMPILE_TIME_ASSERT ((0x7f >> GRUB_DISK_CACHE_BITS
+ << (GRUB_DISK_SECTOR_BITS + GRUB_DISK_CACHE_BITS))
+ + sizeof (struct grub_biosdisk_dap)
+ < GRUB_MEMORY_MACHINE_SCRATCH_SIZE);
disk->data = data;