Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit/libXft/dist initial import of libXft-2.3.6



details:   https://anonhg.NetBSD.org/xsrc/rev/a0b20d8fb342
branches:  trunk
changeset: 7169:a0b20d8fb342
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri Sep 16 06:27:47 2022 +0000

description:
initial import of libXft-2.3.6

diffstat:

 external/mit/libXft/dist/ChangeLog             |  39 ++++++++++++++++++++++++++
 external/mit/libXft/dist/NEWS                  |   8 ++++-
 external/mit/libXft/dist/configure             |  20 ++++++------
 external/mit/libXft/dist/configure.ac          |   2 +-
 external/mit/libXft/dist/include/X11/Xft/Xft.h |   2 +-
 external/mit/libXft/dist/src/xftextent.c       |  20 ++++++------
 external/mit/libXft/dist/src/xftrender.c       |  11 +++++--
 7 files changed, 75 insertions(+), 27 deletions(-)

diffs (286 lines):

diff -r 16dde8b3b002 -r a0b20d8fb342 external/mit/libXft/dist/ChangeLog
--- a/external/mit/libXft/dist/ChangeLog        Sun Sep 11 05:47:47 2022 +0000
+++ b/external/mit/libXft/dist/ChangeLog        Fri Sep 16 06:27:47 2022 +0000
@@ -1,3 +1,42 @@
+commit 7d3bcd3b9ae3ffbfcd4f31c8f1db2254df90bc33
+Author: Thomas E. Dickey <dickey%invisible-island.net@localhost>
+Date:   Sat Sep 10 09:59:49 2022 -0400
+
+    libXft 2.3.6
+    
+    Signed-off-by: Thomas E. Dickey <dickey%invisible-island.net@localhost>
+
+commit 5e0ed11a43e37e50ba0937beaa40851c2d864981
+Author: Thomas E. Dickey <dickey%invisible-island.net@localhost>
+Date:   Wed Sep 7 19:25:06 2022 -0400
+
+    fix gcc12 warning about malloc size
+    
+    Signed-off-by: Thomas E. Dickey <dickey%invisible-island.net@localhost>
+
+commit ab2df0af3dc7c594d44ccccfa0e7ddeeefb1e70e
+Author: Thomas E. Dickey <dickey%invisible-island.net@localhost>
+Date:   Wed Sep 7 19:21:38 2022 -0400
+
+    revised fix for gcc 12 compiler warnings in xftextent.c
+    
+    Signed-off-by: Thomas E. Dickey <dickey%invisible-island.net@localhost>
+
+commit 95284856783b824a714b7506762f4adce3bb17ce
+Author: Adam Sampson <ats%offog.org@localhost>
+Date:   Wed Sep 7 00:31:10 2022 +0100
+
+    Fix length check in XftTextExtents*.
+    
+    Commit 06a3c0ab6520e368ac936cb1ef172f19957db0fa added length checks of
+    the form "if (len <= 0) return;" to various Xft functions. However,
+    while rendering an empty string is equivalent to doing nothing, asking
+    for the extents of an empty string isn't -- it still needs to fill in
+    the extents structure. This broke text rendering in some applications
+    (e.g. xpdf's Motif GUI).
+    
+    Check for len < 0 in XftTextExtents* instead.
+
 commit c6309d4c8fcb5f4879cc25cf81b649f5eb665413
 Author: Thomas E. Dickey <dickey%invisible-island.net@localhost>
 Date:   Mon Sep 5 15:23:18 2022 -0400
diff -r 16dde8b3b002 -r a0b20d8fb342 external/mit/libXft/dist/NEWS
--- a/external/mit/libXft/dist/NEWS     Sun Sep 11 05:47:47 2022 +0000
+++ b/external/mit/libXft/dist/NEWS     Fri Sep 16 06:27:47 2022 +0000
@@ -1,12 +1,16 @@
                        Xft
                X FreeType library
-                 Version 2.3.5
-                   2022-09-05
+                 Version 2.3.6
+                   2022-09-10
 
 Xft version 2.1 was the first stand alone release of Xft, a library that
 connects X applications with the FreeType font rasterization library. Xft
 uses fontconfig to locate fonts so it has no configuration files.
 
+Version 2.3.6
+
+Fixes a regression in 2.3.5 for XftTextExtents* length-checks.
+
 Version 2.3.5
 
 Add support for BGRA glyphs display and scaling
diff -r 16dde8b3b002 -r a0b20d8fb342 external/mit/libXft/dist/configure
--- a/external/mit/libXft/dist/configure        Sun Sep 11 05:47:47 2022 +0000
+++ b/external/mit/libXft/dist/configure        Fri Sep 16 06:27:47 2022 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libXft 2.3.5.
+# Generated by GNU Autoconf 2.69 for libXft 2.3.6.
 #
 # Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libXft/issues>.
 #
@@ -591,8 +591,8 @@
 # Identity of this package.
 PACKAGE_NAME='libXft'
 PACKAGE_TARNAME='libXft'
-PACKAGE_VERSION='2.3.5'
-PACKAGE_STRING='libXft 2.3.5'
+PACKAGE_VERSION='2.3.6'
+PACKAGE_STRING='libXft 2.3.6'
 PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/lib/libXft/issues'
 PACKAGE_URL=''
 
@@ -1365,7 +1365,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libXft 2.3.5 to adapt to many kinds of systems.
+\`configure' configures libXft 2.3.6 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1436,7 +1436,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libXft 2.3.5:";;
+     short | recursive ) echo "Configuration of libXft 2.3.6:";;
    esac
   cat <<\_ACEOF
 
@@ -1569,7 +1569,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libXft configure 2.3.5
+libXft configure 2.3.6
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1893,7 +1893,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libXft $as_me 2.3.5, which was
+It was created by libXft $as_me 2.3.6, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2761,7 +2761,7 @@
 
 # Define the identity of the package.
  PACKAGE='libXft'
- VERSION='2.3.5'
+ VERSION='2.3.6'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -19140,7 +19140,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libXft $as_me 2.3.5, which was
+This file was extended by libXft $as_me 2.3.6, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -19206,7 +19206,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-libXft config.status 2.3.5
+libXft config.status 2.3.6
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -r 16dde8b3b002 -r a0b20d8fb342 external/mit/libXft/dist/configure.ac
--- a/external/mit/libXft/dist/configure.ac     Sun Sep 11 05:47:47 2022 +0000
+++ b/external/mit/libXft/dist/configure.ac     Fri Sep 16 06:27:47 2022 +0000
@@ -27,7 +27,7 @@
 # version.  This version number will be substituted into Xft.h
 # Please bump the minor library number at each release as well.
 #
-AC_INIT([libXft], [2.3.5],
+AC_INIT([libXft], [2.3.6],
         [https://gitlab.freedesktop.org/xorg/lib/libXft/issues], [libXft])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h])
diff -r 16dde8b3b002 -r a0b20d8fb342 external/mit/libXft/dist/include/X11/Xft/Xft.h
--- a/external/mit/libXft/dist/include/X11/Xft/Xft.h    Sun Sep 11 05:47:47 2022 +0000
+++ b/external/mit/libXft/dist/include/X11/Xft/Xft.h    Fri Sep 16 06:27:47 2022 +0000
@@ -31,7 +31,7 @@
 /* #undef will be substituted by configure */
 #define XFT_MAJOR 2
 #define XFT_MINOR 3
-#define XFT_REVISION 5
+#define XFT_REVISION 6
 
 #define XFT_VERSION    ((XFT_MAJOR * 10000) + (XFT_MINOR * 100) + (XFT_REVISION))
 #define XftVersion     XFT_VERSION
diff -r 16dde8b3b002 -r a0b20d8fb342 external/mit/libXft/dist/src/xftextent.c
--- a/external/mit/libXft/dist/src/xftextent.c  Sun Sep 11 05:47:47 2022 +0000
+++ b/external/mit/libXft/dist/src/xftextent.c  Fri Sep 16 06:27:47 2022 +0000
@@ -123,11 +123,11 @@
     FT_UInt        *glyphs, glyphs_local[NUM_LOCAL];
     int                    i;
 
-    if (len <= 0)
+    if (len < 0)
        return;
 
     if (len <= NUM_LOCAL)
-       glyphs = glyphs_local;
+       *(glyphs = glyphs_local) = 0;
     else
     {
        glyphs = AllocUIntArray (len);
@@ -154,11 +154,11 @@
     FT_UInt        *glyphs, glyphs_local[NUM_LOCAL];
     int                    i;
 
-    if (len <= 0)
+    if (len < 0)
        return;
 
     if (len <= NUM_LOCAL)
-       glyphs = glyphs_local;
+       *(glyphs = glyphs_local) = 0;
     else
     {
        glyphs = AllocUIntArray (len);
@@ -185,11 +185,11 @@
     FT_UInt        *glyphs, glyphs_local[NUM_LOCAL];
     int                    i;
 
-    if (len <= 0)
+    if (len < 0)
        return;
 
     if (len <= NUM_LOCAL)
-       glyphs = glyphs_local;
+       *(glyphs = glyphs_local) = 0;
     else
     {
        glyphs = AllocUIntArray (len);
@@ -219,11 +219,11 @@
     int                    l;
     int                    size;
 
-    if (len <= 0)
+    if (len < 0)
        return;
 
     i = 0;
-    glyphs = glyphs_local;
+    *(glyphs = glyphs_local) = 0;
     size = NUM_LOCAL;
     while (len && (l = FcUtf8ToUcs4 (string, &ucs4, len)) > 0)
     {
@@ -266,11 +266,11 @@
     int                    l;
     int                    size;
 
-    if (len <= 0)
+    if (len < 0)
        return;
 
     i = 0;
-    glyphs = glyphs_local;
+    *(glyphs = glyphs_local) = 0;
     size = NUM_LOCAL;
     while (len && (l = FcUtf16ToUcs4 (string, endian, &ucs4, len)) > 0)
     {
diff -r 16dde8b3b002 -r a0b20d8fb342 external/mit/libXft/dist/src/xftrender.c
--- a/external/mit/libXft/dist/src/xftrender.c  Sun Sep 11 05:47:47 2022 +0000
+++ b/external/mit/libXft/dist/src/xftrender.c  Fri Sep 16 06:27:47 2022 +0000
@@ -88,7 +88,7 @@
     FT_UInt        missing[XFT_NMISSING];
     int                    nmissing;
     FT_UInt        g, max;
-    int                    size, width;
+    int                    width;
     int                    dstx, dsty;
     Glyph          wire;
     XftGlyph*       glyph;
@@ -98,6 +98,8 @@
     unsigned int    char_local[NUM_LOCAL];
     unsigned int    *chars;
     FcBool         glyphs_loaded;
+    size_t          size;
+    size_t          needed;
 
     if (!font->format)
        return;
@@ -137,9 +139,12 @@
        size = sizeof (unsigned int);
     }
     chars = char_local;
-    if ((size_t) (nglyphs * size) > sizeof (char_local))
+    if ((size_t)nglyphs > SIZE_MAX / size)
+       goto bail1;
+    needed = (size_t)nglyphs * size;
+    if (needed > sizeof (char_local))
     {
-       chars = malloc ((size_t)(nglyphs * size));
+       chars = malloc (needed);
        if (!chars)
            goto bail1;
     }



Home | Main Index | Thread Index | Old Index