git: 9front

Download patch

ref: b73d0d12fb1a274f854e7aa24bd3f35bebcc98a2
parent: 92f4247b7a6ff24f12577ece02831ae70e0e3aa4
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Oct 28 21:03:04 EDT 2024

ip/traceroute: sprint() -> snprint()

--- a/sys/src/cmd/ip/traceroute.c
+++ b/sys/src/cmd/ip/traceroute.c
@@ -270,7 +270,7 @@
 	msg[n] = 0;
 
 	/* open data file */
-	sprint(file, "%s/%s/%s/data", ds->netdir, ds->proto, msg);
+	snprint(file, sizeof(file), "%s/%s/%s/data", ds->netdir, ds->proto, msg);
 	dfd = open(file, ORDWR);
 	if(dfd < 0)
 		goto out;
--