forked from pool/schily
Jan Engelhardt
2588b7d48a
OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=28
30 lines
929 B
Diff
30 lines
929 B
Diff
From: Kristyna Streitova <kstreitova@suse.com>
|
|
Date: Wed, 06 Jun 2018 14:51:57 +0000
|
|
References: http://bugzilla.opensuse.org/625527
|
|
X-Upstream: PATCH-FIX-UPSTREAM
|
|
|
|
fix bufferoverflow
|
|
|
|
Index: schily-2018-05-25/star/longnames.c
|
|
===================================================================
|
|
--- schily-2018-05-25.orig/star/longnames.c
|
|
+++ schily-2018-05-25/star/longnames.c
|
|
@@ -167,7 +167,7 @@ name_to_tcb(info, ptb)
|
|
if (add)
|
|
strcatl(ptb->ndbuf.t_name, name, "/", (char *)NULL);
|
|
else
|
|
- strcpy(ptb->ndbuf.t_name, name);
|
|
+ strncpy(ptb->ndbuf.t_name, name, props.pr_maxsname);
|
|
return (TRUE);
|
|
}
|
|
|
|
@@ -210,7 +210,7 @@ name_to_tcb(info, ptb)
|
|
if (add)
|
|
strcatl(ptb->ndbuf.t_name, &np[1], "/", (char *)NULL);
|
|
else
|
|
- strcpy(ptb->ndbuf.t_name, &np[1]);
|
|
+ strncpy(ptb->ndbuf.t_name, &np[1], props.pr_maxsname);
|
|
strncpy(ptb->dbuf.t_prefix, name, np - name);
|
|
info->f_flags |= F_SPLIT_NAME;
|
|
return (TRUE);
|