mirror of
https://git.proxmox.com/git/grub2
synced 2025-08-13 16:26:37 +00:00
* Merge from Ubuntu:
- Fix use of freed memory when replacing existing loopback device (LP: #742967).
This commit is contained in:
parent
f2035564b4
commit
1edea9882f
3
debian/changelog
vendored
3
debian/changelog
vendored
@ -4,6 +4,9 @@ grub2 (1.99~rc1-11) UNRELEASED; urgency=low
|
||||
- Make grub-mount exit non-zero if opening the device or filesystem
|
||||
fails.
|
||||
- Translate GRUB error codes into OS error codes for FUSE (LP: #756456).
|
||||
* Merge from Ubuntu:
|
||||
- Fix use of freed memory when replacing existing loopback device
|
||||
(LP: #742967).
|
||||
|
||||
-- Colin Watson <cjwatson@debian.org> Sun, 10 Apr 2011 21:45:43 +0100
|
||||
|
||||
|
31
debian/patches/loopback_replace.patch
vendored
Normal file
31
debian/patches/loopback_replace.patch
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
Description: Fix use of freed memory when replacing existing loopback device
|
||||
Store the loopback device as data on loopback grub_disk structures, rather
|
||||
than the file it points to.
|
||||
Author: Colin Watson <cjwatson@ubuntu.com>
|
||||
Bug-Ubuntu: https://bugs.launchpad.net/bugs/742967
|
||||
Forwarded: yes
|
||||
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3162
|
||||
Last-Update: 2011-04-01
|
||||
|
||||
Index: b/grub-core/disk/loopback.c
|
||||
===================================================================
|
||||
--- a/grub-core/disk/loopback.c
|
||||
+++ b/grub-core/disk/loopback.c
|
||||
@@ -166,7 +166,7 @@
|
||||
disk->total_sectors = GRUB_DISK_SIZE_UNKNOWN;
|
||||
disk->id = (unsigned long) dev;
|
||||
|
||||
- disk->data = dev->file;
|
||||
+ disk->data = dev;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -175,7 +175,7 @@
|
||||
grub_loopback_read (grub_disk_t disk, grub_disk_addr_t sector,
|
||||
grub_size_t size, char *buf)
|
||||
{
|
||||
- grub_file_t file = (grub_file_t) disk->data;
|
||||
+ grub_file_t file = ((struct grub_loopback *) disk->data)->file;
|
||||
grub_off_t pos;
|
||||
|
||||
grub_file_seek (file, sector << GRUB_DISK_SECTOR_BITS);
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -31,3 +31,4 @@ mdraid1x_raid0_size.patch
|
||||
mdraid1x_super_offset.patch
|
||||
host_optimise_flush.patch
|
||||
mkimage_yeeloong.patch
|
||||
loopback_replace.patch
|
||||
|
Loading…
Reference in New Issue
Block a user