Commits

Anonymous committed 8f9f435

don't forget to include a path separator after an SSLDIR;
reported by david hill

Comments (0)

Files changed (1)

usr.sbin/ikectl/ikeca.c

-/*	$OpenBSD: ikeca.c,v 1.23 2012/10/23 14:36:18 reyk Exp $	*/
+/*	$OpenBSD: ikeca.c,v 1.24 2012/12/08 12:51:46 mikeb Exp $	*/
 /*	$vantronix: ikeca.c,v 1.13 2010/06/03 15:52:52 reyk Exp $	*/
 
 /*
 		err(1, "calloc");
 
 	ca->caname = strdup(caname);
-	strlcpy(ca->sslpath, SSLDIR, sizeof(ca->sslpath));
-	strlcat(ca->sslpath, caname, sizeof(ca->sslpath));
+	snprintf(ca->sslpath, sizeof(ca->sslpath), SSLDIR "/%s", caname);
 	strlcpy(ca->passfile, ca->sslpath, sizeof(ca->passfile));
 	strlcat(ca->passfile, "/ikeca.passwd", sizeof(ca->passfile));