summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormillert <>2015-10-13 20:55:37 +0000
committermillert <>2015-10-13 20:55:37 +0000
commit9e151aaca6e7363dac26dfe6ce30adf712fc7102 (patch)
treeeb62edace3a992d9d29f4b818822f89b991ea045 /src
parentcdc3cf9ba9f6acf0bd1c4c8224a3c731914a156c (diff)
downloadopenbsd-9e151aaca6e7363dac26dfe6ce30adf712fc7102.tar.gz
openbsd-9e151aaca6e7363dac26dfe6ce30adf712fc7102.tar.bz2
openbsd-9e151aaca6e7363dac26dfe6ce30adf712fc7102.zip
In rev 1.15 the sizeof argument was fixed in a strlcat() call but
the truncation check immediately following it was not updated to match. Not an issue in practice since the buffers are the same size. OK deraadt@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libc/stdlib/realpath.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libc/stdlib/realpath.c b/src/lib/libc/stdlib/realpath.c
index 7b70b9ddfb..27f1a29061 100644
--- a/src/lib/libc/stdlib/realpath.c
+++ b/src/lib/libc/stdlib/realpath.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: realpath.c,v 1.19 2015/01/16 16:48:51 deraadt Exp $ */ 1/* $OpenBSD: realpath.c,v 1.20 2015/10/13 20:55:37 millert Exp $ */
2/* 2/*
3 * Copyright (c) 2003 Constantin S. Svintsoff <kostik@iclub.nsu.ru> 3 * Copyright (c) 2003 Constantin S. Svintsoff <kostik@iclub.nsu.ru>
4 * 4 *
@@ -190,7 +190,7 @@ realpath(const char *path, char *resolved)
190 symlink[slen + 1] = 0; 190 symlink[slen + 1] = 0;
191 } 191 }
192 left_len = strlcat(symlink, left, sizeof(symlink)); 192 left_len = strlcat(symlink, left, sizeof(symlink));
193 if (left_len >= sizeof(left)) { 193 if (left_len >= sizeof(symlink)) {
194 errno = ENAMETOOLONG; 194 errno = ENAMETOOLONG;
195 goto err; 195 goto err;
196 } 196 }