diff options
author | NeilBrown <neilb@suse.de> | 2009-10-01 08:58:40 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-10-01 08:58:40 +0200 |
commit | ca4f89a3b76187dcd7ca897035a8e92ab67b252d (patch) | |
tree | cfb7a91f30f6f3b51662257c47b581089705acb1 /super0.c | |
parent | Fix raid6 error recovery in 'restripe' code. (diff) | |
parent | Fix null-dereference in set_member_info (diff) | |
download | mdadm-ca4f89a3b76187dcd7ca897035a8e92ab67b252d.tar.xz mdadm-ca4f89a3b76187dcd7ca897035a8e92ab67b252d.zip |
Merge branch 'master' into devel-3.1
Conflicts:
mdadm.8
Diffstat (limited to 'super0.c')
-rw-r--r-- | super0.c | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -1,7 +1,7 @@ /* * mdadm - manage Linux "md" devices aka RAID arrays. * - * Copyright (C) 2001-2006 Neil Brown <neilb@suse.de> + * Copyright (C) 2001-2009 Neil Brown <neilb@suse.de> * * * This program is free software; you can redistribute it and/or modify @@ -19,12 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author: Neil Brown - * Email: <neilb@cse.unsw.edu.au> - * Paper: Neil Brown - * School of Computer Science and Engineering - * The University of New South Wales - * Sydney, 2052 - * Australia + * Email: <neilb@suse.de> */ #define HAVE_STDINT_H 1 @@ -318,9 +313,13 @@ static int match_home0(struct supertype *st, char *homehost) { mdp_super_t *sb = st->sb; char buf[20]; - char *hash = sha1_buffer(homehost, - strlen(homehost), - buf); + char *hash; + + if (!homehost) + return 0; + hash = sha1_buffer(homehost, + strlen(homehost), + buf); return (memcmp(&sb->set_uuid2, hash, 8)==0); } |