Artur Wojcik: Fix for NULL pointer dereference.
Martin F. Krafft
madduck at alioth.debian.org
Wed Jan 27 02:03:50 UTC 2010
Module: mdadm
Branch: upstream
Commit: 791b666ae864cbd6f6c4513859afeb5fc624d02f
URL: http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=791b666ae864cbd6f6c4513859afeb5fc624d02f
Author: Artur Wojcik <artur.wojcik at intel.com>
Date: Thu Dec 10 12:03:39 2009 -0700
Fix for NULL pointer dereference.
Pointers '_dev' and '_disk' returned from call to function '_get_imsm_dev'
and '_get_imsm_disk' may be NULL and will be dereferenced at lines
2933 and 2934, respectively.
Signed-off-by: Artur Wojcik <artur.wojcik at intel.com>
Signed-off-by: Dan Williams <dan.j.williams at intel.com>
---
super-intel.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index 03dcbd5..49e938d 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -2938,6 +2938,10 @@ static int add_to_super_imsm_volume(struct supertype *st, mdu_disk_info_t *dk,
struct imsm_dev *_dev = __get_imsm_dev(mpb, 0);
struct imsm_disk *_disk = __get_imsm_disk(mpb, dl->index);
+ if (!_dev || !_disk) {
+ fprintf(stderr, Name ": BUG mpb setup error\n");
+ return 1;
+ }
*_dev = *dev;
*_disk = dl->disk;
sum = random32();
More information about the pkg-mdadm-commits
mailing list