diff options
author | 1996-12-16 15:09:45 +0000 | |
---|---|---|
committer | 1996-12-16 15:09:45 +0000 | |
commit | f5c716373be2eaef899986d512d8b5e472411132 (patch) | |
tree | cb5a965a2779e8534882182fc1080d7bd7bb2dcf /lib | |
parent | yet another strncat botch (diff) | |
download | wireguard-openbsd-f5c716373be2eaef899986d512d8b5e472411132.tar.xz wireguard-openbsd-f5c716373be2eaef899986d512d8b5e472411132.zip |
stncat misuse
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libedit/el.c | 2 |
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)); } } |