artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf57cbe
)
stncat misuse
author
deraadt
<deraadt@openbsd.org>
Mon, 16 Dec 1996 15:09:45 +0000
(15:09 +0000)
committer
deraadt
<deraadt@openbsd.org>
Mon, 16 Dec 1996 15:09:45 +0000
(15:09 +0000)
lib/libedit/el.c
patch
|
blob
|
history
diff --git
a/lib/libedit/el.c
b/lib/libedit/el.c
index
6a71eb8
..
6b7b5d4
100644
(file)
--- 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));
}
}