summaryrefslogtreecommitdiffstats
path: root/sys/i386/ibcs2
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2003-11-18 14:21:34 +0000
committertjr <tjr@FreeBSD.org>2003-11-18 14:21:34 +0000
commit419b586baeea25eeb764f0249687be3253b2f93c (patch)
treebc58a8ec46f7f66cc726198bb8652401f838e39d /sys/i386/ibcs2
parentaeb3231da54a3650fcf24701bfb935e535a1c3cf (diff)
downloadFreeBSD-src-419b586baeea25eeb764f0249687be3253b2f93c.zip
FreeBSD-src-419b586baeea25eeb764f0249687be3253b2f93c.tar.gz
Replace the dangerous strcpy() call with strlcpy(), instead of the safe one
that was incorrectly changed in rev. 1.61. Approved by: re
Diffstat (limited to 'sys/i386/ibcs2')
-rw-r--r--sys/i386/ibcs2/imgact_coff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/ibcs2/imgact_coff.c b/sys/i386/ibcs2/imgact_coff.c
index f3a8e96..6470813 100644
--- a/sys/i386/ibcs2/imgact_coff.c
+++ b/sys/i386/ibcs2/imgact_coff.c
@@ -388,7 +388,7 @@ exec_coff_imgact(imgp)
libbuf = malloc(MAXPATHLEN + emul_path_len,
M_TEMP, M_WAITOK);
- strlcpy(libbuf, ibcs2_emul_path, MAXPATHLEN);
+ strcpy(libbuf, ibcs2_emul_path);
for (j = off; j < scns[i].s_size + off;) {
long stroff, nextoff;
@@ -402,7 +402,7 @@ exec_coff_imgact(imgp)
DPRINTF(("%s(%d): shared library %s\n",
__FILE__, __LINE__, libname));
- strcpy(&libbuf[emul_path_len], libname);
+ strlcpy(&libbuf[emul_path_len], libname, MAXPATHLEN);
/* XXXKSE only 1:1 in coff */ error = coff_load_file(
FIRST_THREAD_IN_PROC(imgp->proc), libbuf);
if (error)
OpenPOWER on IntegriCloud