diff options
author | 2015-07-12 09:51:25 +0000 | |
---|---|---|
committer | 2015-07-12 09:51:25 +0000 | |
commit | e42cf191d2bcf78df0e33e0df9ffb5d46198d964 (patch) | |
tree | 8696d2a1c2235dfa96b7bf44bceb4aaccbe074ce | |
parent | XXX annotate another signal race (diff) | |
download | wireguard-openbsd-e42cf191d2bcf78df0e33e0df9ffb5d46198d964.tar.xz wireguard-openbsd-e42cf191d2bcf78df0e33e0df9ffb5d46198d964.zip |
Keep one byte for terminating '\0'.
ok nicm@
-rw-r--r-- | usr.bin/file/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/file/file.c b/usr.bin/file/file.c index 7de5614484c..078ed58752b 100644 --- a/usr.bin/file/file.c +++ b/usr.bin/file/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.46 2015/07/08 17:49:45 tobias Exp $ */ +/* $OpenBSD: file.c,v 1.47 2015/07/12 09:51:25 tobias Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -286,7 +286,7 @@ read_link(struct input_msg *msg, const char *path) int used; ssize_t size; - size = readlink(path, lpath, sizeof lpath); + size = readlink(path, lpath, sizeof lpath - 1); if (size == -1) { msg->link_error = errno; return; |