Blame SOURCES/star-1.5.2-bufferoverflow.patch

fa476c
diff --git a/star/longnames.c b/star/longnames.c
fa476c
index 33cbe2a..9d2e303 100644
fa476c
--- a/star/longnames.c
fa476c
+++ b/star/longnames.c
fa476c
@@ -155,7 +155,7 @@ name_to_tcb(info, ptb)
fa476c
 		if (add)
fa476c
 			strcatl(ptb->ndbuf.t_name, name, "/", (char *)NULL);
fa476c
 		else
fa476c
-			strcpy(ptb->ndbuf.t_name, name);
fa476c
+			strncpy(ptb->ndbuf.t_name, name, props.pr_maxsname);
fa476c
 		return (TRUE);
fa476c
 	}
fa476c
 
fa476c
@@ -198,7 +198,7 @@ name_to_tcb(info, ptb)
fa476c
 	if (add)
fa476c
 		strcatl(ptb->ndbuf.t_name, &np[1], "/", (char *)NULL);
fa476c
 	else
fa476c
-		strcpy(ptb->ndbuf.t_name, &np[1]);
fa476c
+		strncpy(ptb->ndbuf.t_name, &np[1], props.pr_maxsname);
fa476c
 	strncpy(ptb->dbuf.t_prefix, name, np - name);
fa476c
 	info->f_flags |= F_SPLIT_NAME;
fa476c
 	return (TRUE);