--- mdadm-2.5.5/config.c.orig 2006-10-27 09:50:52 +0400 +++ mdadm-2.5.5/config.c 2006-10-27 09:55:50 +0400 @@ -545,7 +545,7 @@ void mailfromline(char *line) alert_mail_from = strdup(w); else { char *t= NULL; - asprintf(&t, "%s %s", alert_mail_from, w); + if (asprintf(&t, "%s %s", alert_mail_from, w)) {} free(alert_mail_from); alert_mail_from = t; } --- mdadm-2.5.5/Assemble.c.orig 2006-10-27 09:56:54 +0400 +++ mdadm-2.5.5/Assemble.c 2006-10-27 09:58:37 +0400 @@ -377,11 +377,12 @@ int Assemble(struct supertype *st, char st->ss->getinfo_super(&info, first_super); c = strchr(info.name, ':'); if (c) c++; else c= info.name; - if (isdigit(*c) && ((ident->autof & 7)==4 || (ident->autof&7)==6)) + if (isdigit(*c) && ((ident->autof & 7)==4 || (ident->autof&7)==6)) { /* /dev/md/d0 style for partitionable */ - asprintf(&mddev, "/dev/md/d%s", c); - else - asprintf(&mddev, "/dev/md/%s", c); + if (asprintf(&mddev, "/dev/md/d%s", c)) {} + } else { + if (asprintf(&mddev, "/dev/md/%s", c)) {} + } mdfd = open_mddev(mddev, ident->autof); if (mdfd < 0) return mdfd;