summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1996-12-16 15:09:45 +0000
committerderaadt <deraadt@openbsd.org>1996-12-16 15:09:45 +0000
commitf5c716373be2eaef899986d512d8b5e472411132 (patch)
treecb5a965a2779e8534882182fc1080d7bd7bb2dcf /lib
parentyet another strncat botch (diff)
downloadwireguard-openbsd-f5c716373be2eaef899986d512d8b5e472411132.tar.xz
wireguard-openbsd-f5c716373be2eaef899986d512d8b5e472411132.zip
stncat misuse
Diffstat (limited to 'lib')
-rw-r--r--lib/libedit/el.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libedit/el.c b/lib/libedit/el.c
index 6a71eb82b05..6b7b5d49bc4 100644
--- a/lib/libedit/el.c
+++ b/lib/libedit/el.c
@@ -294,8 +294,8 @@ el_source(el, fname)
if (issetugid() != 0 || (ptr = getenv("HOME")) == NULL)
return -1;
fname = strncpy(path, ptr, MAXPATHLEN);
- (void) strncat(path, elpath, MAXPATHLEN);
path[MAXPATHLEN-1] = '\0';
+ (void) strncat(path, elpath, MAXPATHLEN - strlen(path));
}
}