Browse Source

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@
OPENBSD_5_9
millert 9 years ago
parent
commit
c5fe488aad
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/lib/libc/stdlib/realpath.c

+ 2
- 2
src/lib/libc/stdlib/realpath.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: realpath.c,v 1.19 2015/01/16 16:48:51 deraadt Exp $ */
/* $OpenBSD: realpath.c,v 1.20 2015/10/13 20:55:37 millert Exp $ */
/* /*
* Copyright (c) 2003 Constantin S. Svintsoff <kostik@iclub.nsu.ru> * Copyright (c) 2003 Constantin S. Svintsoff <kostik@iclub.nsu.ru>
* *
@ -190,7 +190,7 @@ realpath(const char *path, char *resolved)
symlink[slen + 1] = 0; symlink[slen + 1] = 0;
} }
left_len = strlcat(symlink, left, sizeof(symlink)); left_len = strlcat(symlink, left, sizeof(symlink));
if (left_len >= sizeof(left)) {
if (left_len >= sizeof(symlink)) {
errno = ENAMETOOLONG; errno = ENAMETOOLONG;
goto err; goto err;
} }


Loading…
Cancel
Save