Module Name:    src
Committed By:   martin
Date:           Thu Dec 13 12:28:25 UTC 2018

Modified Files:
        src/usr.sbin/sysinst: partman.c

Log Message:
Avoid undefined behaviour, pointed out by maxv


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/sysinst/partman.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/partman.c
diff -u src/usr.sbin/sysinst/partman.c:1.24 src/usr.sbin/sysinst/partman.c:1.25
--- src/usr.sbin/sysinst/partman.c:1.24	Tue Nov 27 17:13:41 2018
+++ src/usr.sbin/sysinst/partman.c	Thu Dec 13 12:28:25 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: partman.c,v 1.24 2018/11/27 17:13:41 martin Exp $ */
+/*	$NetBSD: partman.c,v 1.25 2018/12/13 12:28:25 martin Exp $ */
 
 /*
  * Copyright 2012 Eugene Lozovoy
@@ -913,7 +913,7 @@ pm_vnd_commit(void)
 			for (ii = 0; ii < 6; ii++) {
 				strcpy(buf, pm_i->bsdlabel[ii].pi_mount);
 				if (buf[strlen(buf)-1] != '/')
-					sprintf(buf,"%s/", buf);
+					strcat(buf, "/");
 				printf("%s\n",buf);
 				if (strstr(vnds[i].filepath, buf) == vnds[i].filepath)
 					if (part_suit < 0 || pm_suit == NULL ||

Reply via email to