Artur Wojcik: Fix for NULL pointer dereference.

Martin F. Krafft madduck at alioth.debian.org
Wed Jan 27 02:03:49 UTC 2010


Module: mdadm
Branch: upstream
Commit: d10d56feb88ef8a625ec39e04d7c8b711bf08870
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=d10d56feb88ef8a625ec39e04d7c8b711bf08870

Author: Artur Wojcik <artur.wojcik at intel.com>
Date:   Thu Dec 10 12:03:39 2009 -0700

Fix for NULL pointer dereference.

Suspicious dereference of pointer 'super' before NULL check at
line 3429.

Signed-off-by: Artur Wojcik <artur.wojcik at intel.com>
Signed-off-by: Dan Williams <dan.j.williams at intel.com>

---

 super-intel.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/super-intel.c b/super-intel.c
index 4b8e2b7..03dcbd5 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -3426,7 +3426,7 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
 {
 	struct stat stb;
 	struct intel_super *super = st->sb;
-	struct imsm_super *mpb = super->anchor;
+	struct imsm_super *mpb;
 	struct dl *dl;
 	unsigned long long pos = 0;
 	unsigned long long maxsize;
@@ -3436,6 +3436,7 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
 	/* We must have the container info already read in. */
 	if (!super)
 		return 0;
+	mpb = super->anchor;
 
 	if (!is_raid_level_supported(super->orom, level, raiddisks)) {
 		pr_vrb(": platform does not support raid%d with %d disk%s\n",




More information about the pkg-mdadm-commits mailing list