From f5c716373be2eaef899986d512d8b5e472411132 Mon Sep 17 00:00:00 2001 From: deraadt Date: Mon, 16 Dec 1996 15:09:45 +0000 Subject: [PATCH] stncat misuse --- lib/libedit/el.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); } } -- 2.20.1