Module Name: src
Committed By: martin
Date: Fri Aug 14 08:46:54 UTC 2020
Modified Files:
src/usr.sbin/sysinst: label.c
Log Message:
PR 55572: avoid crash when answering the mount point prompt for a previously
empty mount point with an emptry sting.
To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/sysinst/label.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/sysinst/label.c
diff -u src/usr.sbin/sysinst/label.c:1.20 src/usr.sbin/sysinst/label.c:1.21
--- src/usr.sbin/sysinst/label.c:1.20 Mon Jan 27 21:21:22 2020
+++ src/usr.sbin/sysinst/label.c Fri Aug 14 08:46:54 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: label.c,v 1.20 2020/01/27 21:21:22 martin Exp $ */
+/* $NetBSD: label.c,v 1.21 2020/08/14 08:46:54 martin Exp $ */
/*
* Copyright 1997 Jonathan Stone
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: label.c,v 1.20 2020/01/27 21:21:22 martin Exp $");
+__RCSID("$NetBSD: label.c,v 1.21 2020/08/14 08:46:54 martin Exp $");
#endif
#include <sys/types.h>
@@ -356,7 +356,7 @@ edit_fs_mountpt(menudesc *m, void *arg)
if (last != NULL)
last[1] = 0;
- if (*first == 0 || strcmp(first, "none") == 0) {
+ if (first == NULL || *first == 0 || strcmp(first, "none") == 0) {
edit->wanted->mount[0] = 0;
edit->wanted->instflags &= ~PUIINST_MOUNT;
return 0;