mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-27 02:25:55 +00:00
Revert incorrect off-by-one fix when embedding in MBR (LP: #1051154).
This commit is contained in:
parent
a8fd349517
commit
6c18452532
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -3,6 +3,7 @@ grub2 (2.00-5) UNRELEASED; urgency=low
|
||||
* Backport from upstream:
|
||||
- Remove extra layer of escaping from grub_probe.
|
||||
- Add efifwsetup module to reboot into firmware setup menu.
|
||||
- Revert incorrect off-by-one fix when embedding in MBR (LP: #1051154).
|
||||
* Switch watch file to point to ftp.gnu.org.
|
||||
* Build-depend on liblzma-dev, enabling 'grub-mkimage -C xz'.
|
||||
* Adjust /etc/grub.d/30_os-prober to detect Ubuntu's use of "recovery"
|
||||
|
30
debian/patches/msdos_embed_off_by_one.patch
vendored
Normal file
30
debian/patches/msdos_embed_off_by_one.patch
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
Description: Revert incorrect off-by-one fix when embedding in MBR
|
||||
A 62-sector core image should fit before end == 63.
|
||||
Author: Colin Watson <cjwatson@ubuntu.com>
|
||||
Origin: upstream, http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/4586
|
||||
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1051154
|
||||
Forwarded: not-needed
|
||||
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/4586
|
||||
Last-Update: 2012-09-19
|
||||
|
||||
Index: b/grub-core/partmap/msdos.c
|
||||
===================================================================
|
||||
--- a/grub-core/partmap/msdos.c
|
||||
+++ b/grub-core/partmap/msdos.c
|
||||
@@ -316,14 +316,14 @@
|
||||
break;
|
||||
}
|
||||
|
||||
- if (end >= *nsectors + 2)
|
||||
+ if (end >= *nsectors + 1)
|
||||
{
|
||||
unsigned i, j;
|
||||
char *embed_signature_check;
|
||||
unsigned int orig_nsectors, avail_nsectors;
|
||||
|
||||
orig_nsectors = *nsectors;
|
||||
- *nsectors = end - 2;
|
||||
+ *nsectors = end - 1;
|
||||
avail_nsectors = *nsectors;
|
||||
if (*nsectors > max_nsectors)
|
||||
*nsectors = max_nsectors;
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -21,3 +21,4 @@ install_efi_fallback.patch
|
||||
mkconfig_overescaping.patch
|
||||
efifwsetup.patch
|
||||
mkconfig_ubuntu_recovery.patch
|
||||
msdos_embed_off_by_one.patch
|
||||
|
@ -316,14 +316,14 @@ pc_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors,
|
||||
break;
|
||||
}
|
||||
|
||||
if (end >= *nsectors + 2)
|
||||
if (end >= *nsectors + 1)
|
||||
{
|
||||
unsigned i, j;
|
||||
char *embed_signature_check;
|
||||
unsigned int orig_nsectors, avail_nsectors;
|
||||
|
||||
orig_nsectors = *nsectors;
|
||||
*nsectors = end - 2;
|
||||
*nsectors = end - 1;
|
||||
avail_nsectors = *nsectors;
|
||||
if (*nsectors > max_nsectors)
|
||||
*nsectors = max_nsectors;
|
||||
|
Loading…
Reference in New Issue
Block a user