]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authorDamien Miller <djm@mindrot.org>
Tue, 13 Oct 2015 21:27:51 +0000 (08:27 +1100)
committerDamien Miller <djm@mindrot.org>
Tue, 13 Oct 2015 21:27:51 +0000 (08:27 +1100)
revision 1.19
date: 2015/01/16 16:48:51;  author: deraadt;  state: Exp;  lines: +3 -3;  commitid: 0DYulI8hhujBHMcR;
Move to the <limits.h> universe.
review by millert, binary checking process with doug, concept with guenther

openbsd-compat/realpath.c

index e4729a808a92ab71c94ac48aa6c27c7dce5004a6..a6ac09ba5f109b721cbe6debd38767fb17709c5d 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: realpath.c,v 1.18 2014/10/19 03:56:28 doug Exp $ */
+/*     $OpenBSD: realpath.c,v 1.19 2015/01/16 16:48:51 deraadt Exp $ */
 /*
  * Copyright (c) 2003 Constantin S. Svintsoff <kostik@iclub.nsu.ru>
  *
@@ -42,6 +42,7 @@
 #include <stddef.h>
 #include <string.h>
 #include <unistd.h>
+#include <limits.h>
 
 /* A slightly modified copy of this file exists in libexec/ld.so */
 
@@ -164,7 +165,7 @@ realpath(const char *path, char *resolved)
                        goto err;
                }
                if (S_ISLNK(sb.st_mode)) {
-                       if (symlinks++ > MAXSYMLINKS) {
+                       if (symlinks++ > SYMLOOP_MAX) {
                                errno = ELOOP;
                                goto err;
                        }