mirror of
https://git.proxmox.com/git/grub2
synced 2025-08-14 09:38:21 +00:00
branch_butter.patch: Don't free an uninitialised pointer if /proc is
unmounted (LP: #697493).
This commit is contained in:
parent
715cb1e028
commit
18ca658565
7
debian/changelog
vendored
7
debian/changelog
vendored
@ -1,3 +1,10 @@
|
|||||||
|
grub2 (1.99~20110106-2) UNRELEASED; urgency=low
|
||||||
|
|
||||||
|
* branch_butter.patch: Don't free an uninitialised pointer if /proc is
|
||||||
|
unmounted (LP: #697493).
|
||||||
|
|
||||||
|
-- Colin Watson <cjwatson@debian.org> Fri, 07 Jan 2011 17:27:01 +0000
|
||||||
|
|
||||||
grub2 (1.99~20110106-1) experimental; urgency=low
|
grub2 (1.99~20110106-1) experimental; urgency=low
|
||||||
|
|
||||||
* New Bazaar snapshot.
|
* New Bazaar snapshot.
|
||||||
|
13
debian/patches/branch_butter.patch
vendored
13
debian/patches/branch_butter.patch
vendored
@ -1861,7 +1861,7 @@ Index: b/grub-core/kern/emu/getroot.c
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- a/grub-core/kern/emu/getroot.c
|
--- a/grub-core/kern/emu/getroot.c
|
||||||
+++ b/grub-core/kern/emu/getroot.c
|
+++ b/grub-core/kern/emu/getroot.c
|
||||||
@@ -103,8 +103,8 @@
|
@@ -103,14 +103,17 @@
|
||||||
can't deal with the multiple-device case yet, but in the meantime, we can
|
can't deal with the multiple-device case yet, but in the meantime, we can
|
||||||
at least cope with the single-device case by scanning
|
at least cope with the single-device case by scanning
|
||||||
/proc/self/mountinfo. */
|
/proc/self/mountinfo. */
|
||||||
@ -1872,16 +1872,15 @@ Index: b/grub-core/kern/emu/getroot.c
|
|||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
char *buf = NULL;
|
char *buf = NULL;
|
||||||
@@ -115,6 +115,9 @@
|
size_t len = 0;
|
||||||
if (! fp)
|
char *ret = NULL;
|
||||||
return NULL; /* fall through to other methods */
|
|
||||||
|
|
||||||
+ if (relroot)
|
+ if (relroot)
|
||||||
+ *relroot = NULL;
|
+ *relroot = NULL;
|
||||||
+
|
+
|
||||||
while (getline (&buf, &len, fp) > 0)
|
fp = fopen ("/proc/self/mountinfo", "r");
|
||||||
{
|
if (! fp)
|
||||||
int mnt_id, parent_mnt_id;
|
return NULL; /* fall through to other methods */
|
||||||
@@ -131,9 +134,6 @@
|
@@ -131,9 +134,6 @@
|
||||||
&count) < 6)
|
&count) < 6)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user