Artur Wojcik: Fix for NULL pointer dereference defect.
Martin F. Krafft
madduck at alioth.debian.org
Wed Jan 27 02:03:51 UTC 2010
Module: mdadm
Branch: upstream
Commit: 4e9d21862d0fbea7e028ff3a48a0b734440e6015
URL: http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=4e9d21862d0fbea7e028ff3a48a0b734440e6015
Author: Artur Wojcik <artur.wojcik at intel.com>
Date: Thu Dec 10 12:03:39 2009 -0700
Fix for NULL pointer dereference defect.
Pointer 'st' returned from call to function 'malloc' at line 320 may
be NULL and it will be dereferenced at line 321.
Signed-off-by: Artur Wojcik <artur.wojcik at intel.com>
Signed-off-by: Dan Williams <dan.j.williams at intel.com>
---
super-intel.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index cf6288f..a2acaaf 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -318,6 +318,8 @@ static struct supertype *match_metadata_desc_imsm(char *arg)
return NULL;
st = malloc(sizeof(*st));
+ if (!st)
+ return NULL;
memset(st, 0, sizeof(*st));
st->ss = &super_imsm;
st->max_devs = IMSM_MAX_DEVICES;
More information about the pkg-mdadm-commits
mailing list