diff --git a/debian/changelog b/debian/changelog index 1a135e64e..c0fe8c11b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Fri, 07 Jan 2011 17:27:01 +0000 + grub2 (1.99~20110106-1) experimental; urgency=low * New Bazaar snapshot. diff --git a/debian/patches/branch_butter.patch b/debian/patches/branch_butter.patch index 6604359b2..129557e0d 100644 --- a/debian/patches/branch_butter.patch +++ b/debian/patches/branch_butter.patch @@ -1861,7 +1861,7 @@ Index: b/grub-core/kern/emu/getroot.c =================================================================== --- a/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 at least cope with the single-device case by scanning /proc/self/mountinfo. */ @@ -1872,16 +1872,15 @@ Index: b/grub-core/kern/emu/getroot.c { FILE *fp; char *buf = NULL; -@@ -115,6 +115,9 @@ - if (! fp) - return NULL; /* fall through to other methods */ + size_t len = 0; + char *ret = NULL; + if (relroot) + *relroot = NULL; + - while (getline (&buf, &len, fp) > 0) - { - int mnt_id, parent_mnt_id; + fp = fopen ("/proc/self/mountinfo", "r"); + if (! fp) + return NULL; /* fall through to other methods */ @@ -131,9 +134,6 @@ &count) < 6) continue;