>From 96e593071d8759a604e59a2b5e118e52c28fb063 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 14 Oct 2016 02:49:05 +0200 Subject: [PATCH] canonicalize-lgpl: Support the case path_max > INT_MAX. * lib/canonicalize-lgpl.c (__realpath): Declare n as ssize_t, not int. --- ChangeLog | 5 +++++ lib/canonicalize-lgpl.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 32bddf8..ac0b277 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-10-14 Bruno Haible + + canonicalize-lgpl: Support the case path_max > INT_MAX. + * lib/canonicalize-lgpl.c (__realpath): Declare n as ssize_t, not int. + 2016-10-13 Paul Eggert stdint: port SIZE_MAX to glibc s390 diff --git a/lib/canonicalize-lgpl.c b/lib/canonicalize-lgpl.c index 4a38a46..d3f123c 100644 --- a/lib/canonicalize-lgpl.c +++ b/lib/canonicalize-lgpl.c @@ -194,7 +194,6 @@ __realpath (const char *name, char *resolved) #else struct stat st; #endif - int n; /* Skip sequence of multiple path-separators. */ while (ISSLASH (*start)) @@ -275,6 +274,7 @@ __realpath (const char *name, char *resolved) { char *buf; size_t len; + ssize_t n; if (++num_links > MAXSYMLINKS) { -- 2.6.4