diff options
author | 2009-03-28 17:50:05 +0000 | |
---|---|---|
committer | 2009-03-28 17:50:05 +0000 | |
commit | ca2ed54bbb274391248b0c828f1851fa501df1c8 (patch) | |
tree | c6f663402d02c0d8f0f4f034563388cd44894975 /sbin/disklabel/editor.c | |
parent | when i fixed to attic handling i forgot one special case (diff) | |
download | wireguard-openbsd-ca2ed54bbb274391248b0c828f1851fa501df1c8.tar.xz wireguard-openbsd-ca2ed54bbb274391248b0c828f1851fa501df1c8.zip |
do not crash when no mountpoints, spotted by otto; ok krw
Diffstat (limited to 'sbin/disklabel/editor.c')
-rw-r--r-- | sbin/disklabel/editor.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index 4b7fa017bb8..17806e5f016 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.180 2009/03/28 16:27:24 krw Exp $ */ +/* $OpenBSD: editor.c,v 1.181 2009/03/28 17:50:05 deraadt Exp $ */ /* * Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com> @@ -17,7 +17,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: editor.c,v 1.180 2009/03/28 16:27:24 krw Exp $"; +static char rcsid[] = "$OpenBSD: editor.c,v 1.181 2009/03/28 17:50:05 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -466,7 +466,8 @@ editor(struct disklabel *lp, int f, char *dev, char *fstabfile, int aflag) (mountpoints == NULL || mpequal(mountpoints, omountpoints))) { lastlabel = tmplabel; - mpcopy(omountpoints, tmpmountpoints); + if (mountpoints != NULL) + mpcopy(omountpoints, tmpmountpoints); } } } |