]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authorDamien Miller <djm@mindrot.org>
Tue, 13 Oct 2015 21:25:32 +0000 (08:25 +1100)
committerDamien Miller <djm@mindrot.org>
Tue, 13 Oct 2015 21:25:32 +0000 (08:25 +1100)
revision 1.15
date: 2012/09/13 15:39:05;  author: deraadt;  state: Exp;  lines: +2 -2;
specify the bounds of the dst to strlcat (both values were static and
equal, but it is more correct)
from Michal Mazurek

openbsd-compat/realpath.c

index 6646330cab97fb6bae62898c6ff68092e0335103..f2083e0f6582b84e74ec11bcf53df065f027c9ee 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: realpath.c,v 1.14 2011/07/24 21:03:00 miod Exp $ */
+/*     $OpenBSD: realpath.c,v 1.15 2012/09/13 15:39:05 deraadt Exp $ */
 /*
  * Copyright (c) 2003 Constantin S. Svintsoff <kostik@iclub.nsu.ru>
  *
@@ -196,7 +196,7 @@ realpath(const char *path, char *resolved)
                                        symlink[slen] = '/';
                                        symlink[slen + 1] = 0;
                                }
-                               left_len = strlcat(symlink, left, sizeof(left));
+                               left_len = strlcat(symlink, left, sizeof(symlink));
                                if (left_len >= sizeof(left)) {
                                        errno = ENAMETOOLONG;
                                        goto err;