shithub: front

Download patch

ref: e3b364a5134274b9ddfda75eb35b9653a6326213
parent: 0581570c062a12e446355360c1706af491a74e9f
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Aug 5 12:42:23 EDT 2025

upas/fs: no strcpy for username

we don't have a bound no the size of the username,
so don't use strcpy

--- a/sys/src/cmd/upas/fs/fs.c
+++ b/sys/src/cmd/upas/fs/fs.c
@@ -327,7 +327,7 @@
 	mfd[1] = p[0];
 
 	notify(notifyf);
-	strcpy(user, getuser());
+	strecpy(user, user+sizeof(user), getuser());
 	if(mntpt == nil){
 		snprint(maildir, sizeof(maildir), "/mail/fs");
 		mntpt = maildir;
--