summaryrefslogtreecommitdiffstats
path: root/super-intel.c
diff options
context:
space:
mode:
authorArtur Wojcik <artur.wojcik@intel.com>2009-12-10 12:03:40 -0700
committerDan Williams <dan.j.williams@intel.com>2009-12-10 12:03:40 -0700
commitd362da3dfef78f016690e677052b20a163e65236 (patch)
tree35791596df40cbcc18260625f41520359fff5b83 /super-intel.c
parent4e9d21862d0fbea7e028ff3a48a0b734440e6015 (diff)
downloadmdadm-d362da3dfef78f016690e677052b20a163e65236.tar.gz
mdadm-d362da3dfef78f016690e677052b20a163e65236.tar.xz
mdadm-d362da3dfef78f016690e677052b20a163e65236.zip
Fix for NULL pointer dereference defect.
Pointer 'disk' returned from call to function '_get_imsm_disk' at line 700 may be NULL and will be dereferenced at line 710. Signed-off-by: Artur Wojcik <artur.wojcik@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'super-intel.c')
-rw-r--r--super-intel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/super-intel.c b/super-intel.c
index a2acaaf..da753a0 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -703,7 +703,7 @@ static void print_imsm_disk(struct imsm_super *mpb, int index, __u32 reserved)
char str[MAX_RAID_SERIAL_LEN + 1];
__u64 sz;
- if (index < 0)
+ if (index < 0 || !disk)
return;
printf("\n");