diff options
author | 2014-07-11 07:54:04 +0000 | |
---|---|---|
committer | 2014-07-11 07:54:04 +0000 | |
commit | cc05d916257a52c390551cc7da9991c47fd593c7 (patch) | |
tree | 7a8d217e3eb75fe5598d306130fe58d5ba63b28a | |
parent | clarify a comment about readlink. from Doug Hogan (diff) | |
download | wireguard-openbsd-cc05d916257a52c390551cc7da9991c47fd593c7.tar.xz wireguard-openbsd-cc05d916257a52c390551cc7da9991c47fd593c7.zip |
correct readlink termination. from Doug Hogan
-rw-r--r-- | bin/csh/dir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/csh/dir.c b/bin/csh/dir.c index 499f6df7818..05a6d39857b 100644 --- a/bin/csh/dir.c +++ b/bin/csh/dir.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dir.c,v 1.14 2009/10/27 23:59:21 deraadt Exp $ */ +/* $OpenBSD: dir.c,v 1.15 2014/07/11 07:54:04 tedu Exp $ */ /* $NetBSD: dir.c,v 1.9 1995/03/21 09:02:42 cgd Exp $ */ /*- @@ -760,8 +760,8 @@ dcanon(Char *cp, Char *p) !adrof(STRignore_symlinks) && (cc = readlink(short2str(cp), tlink, sizeof tlink-1)) >= 0) { + tlink[cc] = '\0'; (void) Strlcpy(link, str2short(tlink), sizeof link/sizeof(Char)); - link[cc] = '\0'; /* * restore the '/'. |