1 |
vapier 10/02/09 01:55:13 |
2 |
|
3 |
Added: 0001-libblkid-fix-segfault-in-drdb.patch |
4 |
Log: |
5 |
Add fix from upstream for blkid segfaults #301787 by Alec M. |
6 |
(Portage version: 2.2_rc61/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 sys-apps/util-linux/files/0001-libblkid-fix-segfault-in-drdb.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/util-linux/files/0001-libblkid-fix-segfault-in-drdb.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/util-linux/files/0001-libblkid-fix-segfault-in-drdb.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: 0001-libblkid-fix-segfault-in-drdb.patch |
15 |
=================================================================== |
16 |
From 10f494e1a0ac09e144a42fcaeb72663674eb30fc Mon Sep 17 00:00:00 2001 |
17 |
From: =?UTF-8?q?Matthias=20K=C3=B6nig?= <mk@×××××××××.de> |
18 |
Date: Tue, 12 Jan 2010 13:58:28 +0100 |
19 |
Subject: [PATCH] libblkid: fix segfault in drdb |
20 |
MIME-Version: 1.0 |
21 |
Content-Type: text/plain; charset=UTF-8 |
22 |
Content-Transfer-Encoding: 8bit |
23 |
|
24 |
Check if blkid_probe_get_buffer() returns NULL to avoid dereferencing |
25 |
a zero pointer resulting in a segfault. |
26 |
|
27 |
Signed-off-by: Matthias König <mk@×××××××××.de> |
28 |
--- |
29 |
shlibs/blkid/src/superblocks/drbd.c | 3 ++- |
30 |
1 files changed, 2 insertions(+), 1 deletions(-) |
31 |
|
32 |
diff --git a/shlibs/blkid/src/superblocks/drbd.c b/shlibs/blkid/src/superblocks/drbd.c |
33 |
index e0bbb4d..a56486e 100644 |
34 |
--- a/shlibs/blkid/src/superblocks/drbd.c |
35 |
+++ b/shlibs/blkid/src/superblocks/drbd.c |
36 |
@@ -78,7 +78,8 @@ static int probe_drbd(blkid_probe pr, const struct blkid_idmag *mag) |
37 |
blkid_probe_get_buffer(pr, |
38 |
off, |
39 |
sizeof(struct md_on_disk_08)); |
40 |
- |
41 |
+ if (!md) |
42 |
+ return -1; |
43 |
|
44 |
if (be32_to_cpu(md->magic) != DRBD_MD_MAGIC_08) |
45 |
return -1; |
46 |
-- |
47 |
1.6.6.1 |