On 12/30/20 12:15 PM, Adhemerval Zanella wrote:
It sync with gnulib commit 43ee1a6bf and fixes and use-after-free
bug (gnulib commit 717766da8926e36). The main change over gnulib
is:
--- posix/glob.c
+++ lib/glob.c
@@ -59,6 +59,12 @@
# define readdir(str) __readdir64 (str)
# define getpwnam_r(name, bufp, buf, len, res) \
__getpwnam_r (name, bufp, buf, len, res)
+# ifndef __lstat64
+# define __lstat64(fname, buf) __lxstat64 (_STAT_VER, fname, buf)
+# endif
+# ifndef __stat64
+# define __stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf)
+# endif
# define struct_stat64 struct stat64
# define FLEXIBLE_ARRAY_MEMBER
# include <shlib-compat.h>
Thanks, the code patch looks fine. You can now simplify its commit
message because I just now propagated the above fix into Gnulib, by
installing the attached patch into Gnulib.
From 562592fc53384f9b9ecdd40577cc94c10c3f7eea Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Thu, 31 Dec 2020 09:05:13 -0800
Subject: [PATCH 1/2] glob: merge proposed glibc changes
This merges the change proposed by Adhemerval Zanella in:
https://sourceware.org/pipermail/libc-alpha/2020-December/121211.html
* lib/glob.c (__lstat64, __stat64) [_LIBC]: Remove.
---
ChangeLog | 7 +++++++
lib/glob.c | 6 ------
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7dd4ffdd6..5da7c043a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2020-12-31 Paul Eggert <egg...@cs.ucla.edu>
+
+ glob: merge proposed glibc changes
+ This merges the change proposed by Adhemerval Zanella in:
+ https://sourceware.org/pipermail/libc-alpha/2020-December/121211.html
+ * lib/glob.c (__lstat64, __stat64) [_LIBC]: Remove.
+
2020-12-31 Bruno Haible <br...@clisp.org>
memalign: Work around Solaris bug.
diff --git a/lib/glob.c b/lib/glob.c
index 3c444d3b1..20239f780 100644
--- a/lib/glob.c
+++ b/lib/glob.c
@@ -59,12 +59,6 @@
# define readdir(str) __readdir64 (str)
# define getpwnam_r(name, bufp, buf, len, res) \
__getpwnam_r (name, bufp, buf, len, res)
-# ifndef __lstat64
-# define __lstat64(fname, buf) __lxstat64 (_STAT_VER, fname, buf)
-# endif
-# ifndef __stat64
-# define __stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf)
-# endif
# define struct_stat64 struct stat64
# define FLEXIBLE_ARRAY_MEMBER
# include <shlib-compat.h>
--
2.27.0