Sun Jun 6 21:05:08 2021 UTC ()
libX11: update to 1.7.2.

This is a bug fix release, correcting a regression [1] introduced by and
improving the checks from the fix for CVE-2021-31535.

[1] https://gitlab.freedesktop.org/xorg/lib/libx11/-/issues/133

Alan Coopersmith (1):
      libX11 1.7.2

Matthieu Herrb (2):
      include <limits.h> always, not if HAVE_CONFIG_H is set.
      Check for NULL strings before getting their lengths

Tobias Stoeckmann (1):
      Protect against overly long strings


(wiz)
diff -r1.57 -r1.58 pkgsrc/x11/libX11/Makefile
diff -r1.37 -r1.38 pkgsrc/x11/libX11/distinfo
diff -r1.6 -r1.7 pkgsrc/x11/libX11/patches/patch-Makefile.in
diff -r1.13 -r1.14 pkgsrc/x11/libX11/patches/patch-ac

cvs diff -r1.57 -r1.58 pkgsrc/x11/libX11/Makefile (expand / switch to unified diff)

--- pkgsrc/x11/libX11/Makefile 2021/05/18 16:31:33 1.57
+++ pkgsrc/x11/libX11/Makefile 2021/06/06 21:05:08 1.58
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1# $NetBSD: Makefile,v 1.57 2021/05/18 16:31:33 wiz Exp $ 1# $NetBSD: Makefile,v 1.58 2021/06/06 21:05:08 wiz Exp $
2 2
3DISTNAME= libX11-1.7.1 3DISTNAME= libX11-1.7.2
4CATEGORIES= x11 devel 4CATEGORIES= x11 devel
5MASTER_SITES= ${MASTER_SITE_XORG:=lib/} 5MASTER_SITES= ${MASTER_SITE_XORG:=lib/}
6EXTRACT_SUFX= .tar.bz2 6EXTRACT_SUFX= .tar.bz2
7 7
8MAINTAINER= joerg@NetBSD.org 8MAINTAINER= joerg@NetBSD.org
9HOMEPAGE= https://xorg.freedesktop.org/ 9HOMEPAGE= https://xorg.freedesktop.org/
10COMMENT= Base X libraries from modular Xorg X11 10COMMENT= Base X libraries from modular Xorg X11
11LICENSE= mit 11LICENSE= mit
12 12
13USE_LIBTOOL= yes 13USE_LIBTOOL= yes
14GNU_CONFIGURE= yes 14GNU_CONFIGURE= yes
15USE_TOOLS+= gmake pkg-config 15USE_TOOLS+= gmake pkg-config
16 16

cvs diff -r1.37 -r1.38 pkgsrc/x11/libX11/distinfo (expand / switch to unified diff)

--- pkgsrc/x11/libX11/distinfo 2021/05/18 16:31:33 1.37
+++ pkgsrc/x11/libX11/distinfo 2021/06/06 21:05:08 1.38
@@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@
1$NetBSD: distinfo,v 1.37 2021/05/18 16:31:33 wiz Exp $ 1$NetBSD: distinfo,v 1.38 2021/06/06 21:05:08 wiz Exp $
2 2
3SHA1 (libX11-1.7.1.tar.bz2) = 5c605b8e3f0d310d68193555d95f11c7e002945a 3SHA1 (libX11-1.7.2.tar.bz2) = ff503c816f1e812070ac0e1841bc3634c3b370b6
4RMD160 (libX11-1.7.1.tar.bz2) = c43b7769bd9443d014a7e07257254d39516bd4ea 4RMD160 (libX11-1.7.2.tar.bz2) = ea685d299dc697d81747c2abcbd018d3d523796f
5SHA512 (libX11-1.7.1.tar.bz2) = a76f0a82fce6f9b50646a7cd7ec5ee046650f225816050226068a7548fa083ef07d146d40faaf44e033c59c17b0fda5ffdee3a127dac3ab56cee02133819aa3d 5SHA512 (libX11-1.7.2.tar.bz2) = d01e5c1848c76218605e5af2d353de6b301a251555b52a38dbe930e6635d5e8a92d1486eb6d328ad5d42a5939e0d16868ffa19a75e5a7863d1a32e0d0727bdc7
6Size (libX11-1.7.1.tar.bz2) = 2426509 bytes 6Size (libX11-1.7.2.tar.bz2) = 2392982 bytes
7SHA1 (patch-Makefile.in) = a38502ac45908a4a8d57de42e301894a2e9f8a15 7SHA1 (patch-Makefile.in) = fc23ec24244e1c7213fca3bdc09adca6b379839a
8SHA1 (patch-aa) = 4f502264e7200fd2f9409d8684c53de3bc6f0649 8SHA1 (patch-aa) = 4f502264e7200fd2f9409d8684c53de3bc6f0649
9SHA1 (patch-ac) = 565aa2a636b5c50f67cbd11e7c2adcac8d55418e 9SHA1 (patch-ac) = 84bad85defd7cdac82fe4448d723c80469507f73
10SHA1 (patch-src_xkb_XKBBind.c) = 3ad94bd3265c3c4a85bcf3e2da0782c16fd461d1 10SHA1 (patch-src_xkb_XKBBind.c) = 3ad94bd3265c3c4a85bcf3e2da0782c16fd461d1

cvs diff -r1.6 -r1.7 pkgsrc/x11/libX11/patches/Attic/patch-Makefile.in (expand / switch to unified diff)

--- pkgsrc/x11/libX11/patches/Attic/patch-Makefile.in 2020/11/20 20:42:53 1.6
+++ pkgsrc/x11/libX11/patches/Attic/patch-Makefile.in 2021/06/06 21:05:08 1.7
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1$NetBSD: patch-Makefile.in,v 1.6 2020/11/20 20:42:53 wiz Exp $ 1$NetBSD: patch-Makefile.in,v 1.7 2021/06/06 21:05:08 wiz Exp $
2 2
3Avoid unnecessary auto* due to patch-aa modifying configure.ac. 3Avoid unnecessary auto* due to patch-aa modifying configure.ac.
4 4
5--- Makefile.in.orig 2020-11-20 19:08:19.000000000 +0000 5--- Makefile.in.orig 2021-06-06 16:49:02.000000000 +0000
6+++ Makefile.in 6+++ Makefile.in
7@@ -95,8 +95,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/a 7@@ -92,8 +92,7 @@ subdir = .
8 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ 8 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
9 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ 9 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \
10 $(top_srcdir)/configure.ac 10 $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/configure.ac
11-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 11-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
12- $(ACLOCAL_M4) 12- $(ACLOCAL_M4)
13+am__configure_deps =  13+am__configure_deps =
14 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ 14 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
15 $(am__configure_deps) $(am__DIST_COMMON) 15 $(am__configure_deps) $(am__DIST_COMMON)
16 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ 16 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \

cvs diff -r1.13 -r1.14 pkgsrc/x11/libX11/patches/Attic/patch-ac (expand / switch to unified diff)

--- pkgsrc/x11/libX11/patches/Attic/patch-ac 2014/05/30 12:51:29 1.13
+++ pkgsrc/x11/libX11/patches/Attic/patch-ac 2021/06/06 21:05:08 1.14
@@ -1,73 +1,70 @@ @@ -1,73 +1,70 @@
1$NetBSD: patch-ac,v 1.13 2014/05/30 12:51:29 wiz Exp $ 1$NetBSD: patch-ac,v 1.14 2021/06/06 21:05:08 wiz Exp $
2 2
3See patch-aa. 3See patch-aa.
4 4
5--- configure.orig 2013-09-09 01:37:35.000000000 +0000 5--- configure.orig 2021-06-06 16:49:01.000000000 +0000
6+++ configure 6+++ configure
7@@ -20104,43 +20104,18 @@ $as_echo "#define XUSE_MTSAFE_API 1" >>c 7@@ -22009,42 +22009,16 @@ printf "%s\n" "#define XUSE_MTSAFE_API 1
8 ;; 8 ;;
9 esac 9 esac
10  10
11-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lc" >&5 11-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lc" >&5
12-$as_echo_n "checking for pthread_self in -lc... " >&6; } 12-printf %s "checking for pthread_self in -lc... " >&6; }
13-if ${ac_cv_lib_c_pthread_self+:} false; then : 13-if test ${ac_cv_lib_c_pthread_self+y}
14- $as_echo_n "(cached) " >&6 14+ac_fn_check_decl "$LINENO" "pthread_self" "ac_cv_have_decl_pthread_self" "#include <pthread.h>
15+ac_fn_c_check_decl "$LINENO" "pthread_self" "ac_cv_have_decl_pthread_self" "#include <pthread.h> 15+" "$ac_c_undeclared_builtin_options" "CFLAGS"
16+" 16+if test "x$ac_cv_have_decl_pthread_self" = xyes
17+if test "x$ac_cv_have_decl_pthread_self" = xyes; then : 17 then :
 18- printf %s "(cached) " >&6
18+ ac_have_decl=1 19+ ac_have_decl=1
19 else 20 else $as_nop
20- ac_check_lib_save_LIBS=$LIBS 21- ac_check_lib_save_LIBS=$LIBS
21-LIBS="-lc $LIBS" 22-LIBS="-lc $LIBS"
22-cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23-/* end confdefs.h. */ 24-/* end confdefs.h. */
24+ ac_have_decl=0 25-
25+fi 
26  
27-/* Override any GCC internal prototype to avoid an error. 26-/* Override any GCC internal prototype to avoid an error.
28- Use char because int might match the return type of a GCC 27- Use char because int might match the return type of a GCC
29- builtin and then its argument prototype would still apply. */ 28- builtin and then its argument prototype would still apply. */
30-#ifdef __cplusplus 
31-extern "C" 
32-#endif 
33-char pthread_self (); 29-char pthread_self ();
34-int 30-int
35-main () 31-main (void)
36-{ 32-{
37-return pthread_self (); 33-return pthread_self ();
38- ; 34- ;
39- return 0; 35- return 0;
40-} 36-}
41+cat >>confdefs.h <<_ACEOF 37-_ACEOF
42+#define HAVE_DECL_PTHREAD_SELF $ac_have_decl 38-if ac_fn_c_try_link "$LINENO"
43 _ACEOF 39-then :
44-if ac_fn_c_try_link "$LINENO"; then : 
45- ac_cv_lib_c_pthread_self=yes 40- ac_cv_lib_c_pthread_self=yes
46-else 41-else $as_nop
47- ac_cv_lib_c_pthread_self=no 42- ac_cv_lib_c_pthread_self=no
48-fi 43-fi
49-rm -f core conftest.err conftest.$ac_objext \ 44-rm -f core conftest.err conftest.$ac_objext conftest.beam \
50- conftest$ac_exeext conftest.$ac_ext 45- conftest$ac_exeext conftest.$ac_ext
51-LIBS=$ac_check_lib_save_LIBS 46-LIBS=$ac_check_lib_save_LIBS
52-fi 47+ ac_have_decl=0
53-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_self" >&5 48 fi
54-$as_echo "$ac_cv_lib_c_pthread_self" >&6; } 49-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_self" >&5
55-if test "x$ac_cv_lib_c_pthread_self" = xyes; then : 50-printf "%s\n" "$ac_cv_lib_c_pthread_self" >&6; }
56+if test $ac_have_decl = 1; then : 51-if test "x$ac_cv_lib_c_pthread_self" = xyes
 52+printf "%s\n" "#define HAVE_DECL_PTHREAD_SELF $ac_have_decl" >>confdefs.h
 53+if test $ac_have_decl = 1
 54 then :
57 thrstubs="no" 55 thrstubs="no"
58 else 56 else $as_nop
59 thrstubs="yes" 57@@ -22066,12 +22040,12 @@ if test x$xthreads = xyes ; then
60@@ -20161,12 +20136,12 @@ if test x$xthreads = xyes ; then 
61 linux*|gnu*|k*bsd*-gnu) 58 linux*|gnu*|k*bsd*-gnu)
62 XTHREADLIB=-lpthread ;; 59 XTHREADLIB=-lpthread ;;
63 netbsd*) 60 netbsd*)
64- XTHREAD_CFLAGS="-D_POSIX_THREAD_SAFE_FUNCTIONS" 61- XTHREAD_CFLAGS="-D_POSIX_THREAD_SAFE_FUNCTIONS"
65- XTHREADLIB="-lpthread" ;; 62- XTHREADLIB="-lpthread" ;;
66+ XTHREAD_CFLAGS="-D_REENTRANT" 63+ XTHREAD_CFLAGS="-D_REENTRANT"
67+ XTHREADLIB="-pthread" ;; 64+ XTHREADLIB="-pthread" ;;
68 freebsd*) 65 freebsd*)
69 XTHREAD_CFLAGS="-D_THREAD_SAFE" 66 XTHREAD_CFLAGS="-D_THREAD_SAFE"
70 XTHREADLIB="-pthread" ;; 67 XTHREADLIB="-pthread" ;;
71- dragonfly*|openbsd*) 68- dragonfly*|openbsd*)
72+ dragonfly*|openbsd*|mirbsd*) 69+ dragonfly*|openbsd*|mirbsd*)
73 XTHREADLIB="-pthread" ;; 70 XTHREADLIB="-pthread" ;;