NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

install/55572: sysinst installer gets segfault when mount point is empty as input



>Number:         55572
>Category:       install
>Synopsis:       sysinst installer gets segfault when mount point is empty as input
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 14 07:10:00 +0000 2020
>Originator:     Ryo ONODERA
>Release:        NetBSD 9.99.70
>Organization:
Ryo ONODERA // ryo%tetera.org@localhost
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3
>Environment:
	
	
System: NetBSD brownie 9.99.70 NetBSD 9.99.70 (GENERIC) #1: Fri Aug 14 10:18:30 JST 2020 ryoon@brownie:/usr/world/9.99/amd64/obj/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
	
In sysinst installer on NetBSD/amd64 9.99.70,
if default mount point is empty, empty input (just hit enter)
causes segfault.

>How-To-Repeat:
	
(1) Run sysinst installer from install image or run /usr/sbin/sysinst.
(2) Select GPT partitioning.
(3) Select MSDOS (FAT) file system's mount point option (default
value is empty).
(4) Just hit enter key.
(5) Get segfault.

>Fix:
	
Like as follows.

Index: usr.sbin/sysinst/label.c
===================================================================
RCS file: /cvsroot/src/usr.sbin/sysinst/label.c,v
retrieving revision 1.20
diff -u -r1.20 label.c
--- usr.sbin/sysinst/label.c	27 Jan 2020 21:21:22 -0000	1.20
+++ usr.sbin/sysinst/label.c	14 Aug 2020 06:49:06 -0000
@@ -356,6 +356,9 @@
 	if (last != NULL)
 		last[1] = 0;
 
+	if (first == NULL)
+		return 0;
+
 	if (*first == 0 || strcmp(first, "none") == 0) {
 		edit->wanted->mount[0] = 0;
 		edit->wanted->instflags &= ~PUIINST_MOUNT;

>Unformatted:
 	
 	


Home | Main Index | Thread Index | Old Index