diff options
-rw-r--r-- | lib/libXfont2/ChangeLog | 234 | ||||
-rw-r--r-- | lib/libXfont2/README | 17 | ||||
-rwxr-xr-x | lib/libXfont2/configure | 40 | ||||
-rw-r--r-- | lib/libXfont2/configure.ac | 19 | ||||
-rw-r--r-- | lib/libXfont2/src/FreeType/ftfuncs.c | 2 | ||||
-rw-r--r-- | lib/libXfont2/src/FreeType/fttools.c | 1 | ||||
-rw-r--r-- | lib/libXfont2/src/bitmap/bitscale.c | 4 | ||||
-rw-r--r-- | lib/libXfont2/src/bitmap/pcfread.c | 13 | ||||
-rw-r--r-- | lib/libXfont2/src/fc/fserve.c | 8 | ||||
-rw-r--r-- | lib/libXfont2/src/fc/fstrans.c | 2 | ||||
-rw-r--r-- | lib/libXfont2/src/fontfile/fontdir.c | 4 |
11 files changed, 303 insertions, 41 deletions
diff --git a/lib/libXfont2/ChangeLog b/lib/libXfont2/ChangeLog index 9116acdb8..c5e577f79 100644 --- a/lib/libXfont2/ChangeLog +++ b/lib/libXfont2/ChangeLog @@ -1,3 +1,213 @@ +commit d82dfe25491c599f650b2ad868772c3b8e6ba7bc +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Oct 11 11:33:29 2017 -0400 + + libXfont 2.0.2 + + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 672bb944311392e2415b39c0d63b1e1902905bcd +Author: Michal Srb <msrb@suse.com> +Date: Thu Jul 20 17:05:23 2017 +0200 + + pcfGetProperties: Check string boundaries (CVE-2017-13722) + + Without the checks a malformed PCF file can cause the library to make + atom from random heap memory that was behind the `strings` buffer. + This may crash the process or leak information. + + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit d1e670a4a8704b8708e493ab6155589bcd570608 +Author: Michal Srb <msrb@suse.com> +Date: Thu Jul 20 13:38:53 2017 +0200 + + Check for end of string in PatternMatch (CVE-2017-13720) + + If a pattern contains '?' character, any character in the string is skipped, + even if it is '\0'. The rest of the matching then reads invalid memory. + + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Julien Cristau <jcristau@debian.org> + +commit 9112a6846b9d8ff18f7568c58e06d0a450e25814 +Author: Adam Jackson <ajax@redhat.com> +Date: Thu Apr 13 12:10:05 2017 -0400 + + readme: Update for libXfont 2.0 interface change + + While xfs can be more or less trivially ported to 2.0, bcftopcf cannot + because the font file I/O API is no longer externally visible. This is + intentional, because bdftopcf is literally the only consumer of that + API, and is itself only used in the build process for the classic core + fonts themselves. The plan for bdftopcf is to import a copy of libXfont + 1.5 and link against that statically instead. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Acked-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit f8ff8d5f7442b3cbac57d5fe343aabd8f54a030f +Author: Emil Velikov <emil.l.velikov@gmail.com> +Date: Mon Mar 9 12:00:52 2015 +0000 + + autogen.sh: use quoted string variables + + Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent + fall-outs, when they contain space. + + Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> + Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 75b9a15b51a062941a549fef0dedaee9daef4867 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Tue Jan 24 10:32:07 2017 +1000 + + autogen.sh: use exec instead of waiting for configure to finish + + Syncs the invocation of configure with the one from the server. + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + Reviewed-by: Emil Velikov <emil.velikov@collabora.com> + +commit 33a98f2b5343da927f29191348e992f505544873 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Jun 8 14:28:09 2016 -0400 + + freetype: Fix a logic error in computing face name + + gcc6 chirps an indentation warning here, but really this is bad code. + Effectively this would ignore en_US or en_UK names for the font, despite + that those are the English names the font is most likely to have. + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 79084468fb844e386a72d938c67be0728959a2bd +Author: Adam Jackson <ajax@redhat.com> +Date: Wed May 18 11:49:52 2016 -0400 + + autogen: Set a default subject prefix for patches + + Signed-off-by: Adam Jackson <ajax@redhat.com> + +commit 7557fe152d9948bcb4b805bb7b6b6f8121bd34fb +Author: Adam Jackson <ajax@redhat.com> +Date: Wed May 18 11:52:27 2016 -0400 + + configure: Use -fvisibility=hidden if available + + text data bss dec hex filename + 233732 8168 1616 243516 3b73c .libs/libXfont2.so.2.before + 217113 6816 1616 225545 37109 .libs/libXfont2.so.2.after + + Signed-off-by: Adam Jackson <ajax@redhat.com> + Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> + +commit 6972ea08ee5b2ef1cfbdc2fcaf14f06bbd391561 +Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com> +Date: Mon May 30 00:46:21 2016 -0700 + + fserve: Fix a buffer read overrun in _fs_client_access + + https://bugs.freedesktop.org/show_bug.cgi?id=83224 + + Found by clang's Address Sanitizer + + crac.num_auths = set_font_authorizations(&authorizations, &authlen, + client); + /* Work around bug in xfs versions up through modular release 1.0.8 + which rejects CreateAC packets with num_auths = 0 & authlen < 4 */ + if (crac.num_auths == 0) { + authorizations = padding; + authlen = 4; + } else { + authlen = (authlen + 3) & ~0x3; + } + crac.length = (sizeof (fsCreateACReq) + authlen) >> 2; + crac.acid = cur->acid; + _fs_add_req_log(conn, FS_CreateAC); + _fs_write(conn, (char *) &crac, sizeof (fsCreateACReq)); + _fs_write(conn, authorizations, authlen); + + In the case in the report, set_font_authorizations setup authorizations as a + 34 byte buffer (and authlen set to 34 as one would expect). The following + block changed authlen to 36 to make it 4byte aligned and the final _fs_write() + caused us to read 36 bytes from this 34 byte buffer. + + This changes the incorrect size increase to instead use _fs_write_pad which + takes care of the padding for us. + + Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> + +commit d967caa988eaabd9e84c82879e2f21bd33b952a7 +Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com> +Date: Sun May 29 23:39:06 2016 -0700 + + fstrans: Remove unused foo() function + + The point of it seems to have been to silence an unused function warning, but + there's no point if we're just transitioning that to another unused function + warning. + + src/fc/fstrans.c:32:20: warning: unused function 'foo' [-Wunused-function] + static inline void foo(void) { (void) is_numeric("a"); } + ^ + 1 warning generated. + + Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> + Reviewed-by: Keith Packard <keithp@keithp.com> + +commit e6009adbc89ec3e1f924bcb57b333c1c02f5e66d +Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com> +Date: Sun May 29 23:37:13 2016 -0700 + + fserve: Silence a -Wformat warning + + src/fc/fserve.c:653:32: warning: format specifies type 'int' but the argument has type 'CARD32' (aka 'unsigned long') [-Wformat] + " from font server\n", rep->length); + ^~~~~~~~~~~ + 1 warning generated. + + Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> + +commit ac559fad20bbae45332c758abb6a790c3fd341a2 +Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com> +Date: Sun May 29 23:34:35 2016 -0700 + + bitmap: Bail out on invalid input to FontFileMakeDir instead of calling calloc for 0 bytes + + Found by clang static analysis: + Call to 'calloc' has an allocation size of 0 bytes + + Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> + +commit d0fff111992fed9d9bfbf0c19e136bda9ba1db55 +Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com> +Date: Sun May 29 23:29:50 2016 -0700 + + FreeType: Correct an allocation size + + Found by clang static analysis: + Result of 'calloc' is converted to a pointer of type 'int', which is + incompatible with sizeof operand type 'int *' + + This is likely benign because the old size was larger on any platform where + sizeof(int) <= sizeof(void *), which is everywhere. + + Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> + +commit eefc0b0b908eb8533e704d7156ce983ad7891cc5 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Dec 12 14:54:26 2015 -0800 + + Revert "Add compiler warning flags". Leave warning fixes. + + This reverts commit eb67d10ae82b364a4324e96ce53baaa4e5e75f97, but + leaves the warning fixes in place; it looks like either I was + confused, or something has changed so that XORG_DEFAULT_OPTIONS now + pulls in the appropriate compiler warnings. + commit 14488af0338191356c0177e3d0b5fa473ffbd59c Author: Keith Packard <keithp@keithp.com> Date: Fri Dec 11 07:08:29 2015 -0800 @@ -1353,7 +1563,7 @@ Date: Wed Apr 14 05:58:28 2010 -0500 Conflicts: - ChangeLog + ChangeLog Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> @@ -2166,7 +2376,7 @@ Date: Tue Jun 19 10:38:02 2007 -0400 This patch adds a new FPE type, which will match font path elements of the form - catalogue:<dir> + catalogue:<dir> The dir specified after the catalogue: prefix will be scanned for symlinks and each symlink destination will be added as a local fontfile FPE. @@ -2176,22 +2386,22 @@ Date: Tue Jun 19 10:38:02 2007 -0400 An example configuration: - 75dpi:unscaled:pri=20 -> /usr/share/X11/fonts/75dpi - ghostscript:pri=60 -> /usr/share/fonts/default/ghostscript - misc:unscaled:pri=10 -> /usr/share/X11/fonts/misc - type1:pri=40 -> /usr/share/X11/fonts/Type1 - type1:pri=50 -> /usr/share/fonts/default/Type1 + 75dpi:unscaled:pri=20 -> /usr/share/X11/fonts/75dpi + ghostscript:pri=60 -> /usr/share/fonts/default/ghostscript + misc:unscaled:pri=10 -> /usr/share/X11/fonts/misc + type1:pri=40 -> /usr/share/X11/fonts/Type1 + type1:pri=50 -> /usr/share/fonts/default/Type1 will add /usr/share/X11/fonts/misc as the first FPE with the attribute 'unscaled', second FPE will be /usr/share/X11/fonts/75dpi, also with the attribute unscaled etc. This is functionally equivalent to setting the following font path: - /usr/share/X11/fonts/misc:unscaled, - /usr/share/X11/fonts/75dpi:unscaled, - /usr/share/X11/fonts/Type1, - /usr/share/fonts/default/Type1, - /usr/share/fonts/default/ghostscript + /usr/share/X11/fonts/misc:unscaled, + /usr/share/X11/fonts/75dpi:unscaled, + /usr/share/X11/fonts/Type1, + /usr/share/fonts/default/Type1, + /usr/share/fonts/default/ghostscript The motivation is to let font packages add a symlink to the new font directory they provide instead of rewriting either the Xorg config file diff --git a/lib/libXfont2/README b/lib/libXfont2/README index c95c3cf1f..de1512f3b 100644 --- a/lib/libXfont2/README +++ b/lib/libXfont2/README @@ -1,9 +1,14 @@ -libXfont provides the core of the legacy X11 font system, handling the -index files (fonts.dir, fonts.alias, fonts.scale), the various font file -formats, and rasterizing them. It is used by the X servers, the -X Font Server (xfs), and some font utilities (bdftopcf for instance), -but should not be used by normal X11 clients. X11 clients access fonts -via either the new API's in libXft, or the legacy API's in libX11. +libXfont provides the core of the legacy X11 font system, handling the index +files (fonts.dir, fonts.alias, fonts.scale), the various font file formats, +and rasterizing them. It is used by the X servers, and will eventually be +used by the X Font Server (xfs), but should not be used by normal X11 clients. +X11 clients access fonts via either the new APIs in libXft, or the legacy +APIs in libX11. + +This version of libXfont is not compatible with xfs, or with the legacy +bdftopcf utility; these packages require libXfont 1.5, not libXfont 2.0 +or later. The two versions can be installed in parallel, and eventually +the need for 1.5 will go away. We apologize for the inconvenience. libXfont supports a number of compression and font formats, and the configure script takes various options to enable or disable them: diff --git a/lib/libXfont2/configure b/lib/libXfont2/configure index bf684bddf..93428c787 100755 --- a/lib/libXfont2/configure +++ b/lib/libXfont2/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libXfont2 2.0.1. +# Generated by GNU Autoconf 2.69 for libXfont2 2.0.2. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. # @@ -651,8 +651,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libXfont2' PACKAGE_TARNAME='libXfont2' -PACKAGE_VERSION='2.0.1' -PACKAGE_STRING='libXfont2 2.0.1' +PACKAGE_VERSION='2.0.2' +PACKAGE_STRING='libXfont2 2.0.2' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' PACKAGE_URL='' @@ -1468,7 +1468,7 @@ if test "$ac_init_help" = "long"; then # 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 libXfont2 2.0.1 to adapt to many kinds of systems. +\`configure' configures libXfont2 2.0.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1538,7 +1538,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libXfont2 2.0.1:";; + short | recursive ) echo "Configuration of libXfont2 2.0.2:";; esac cat <<\_ACEOF @@ -1687,7 +1687,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libXfont2 configure 2.0.1 +libXfont2 configure 2.0.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2213,7 +2213,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libXfont2 $as_me 2.0.1, which was +It was created by libXfont2 $as_me 2.0.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3042,7 +3042,7 @@ fi # Define the identity of the package. PACKAGE='libXfont2' - VERSION='2.0.1' + VERSION='2.0.2' cat >>confdefs.h <<_ACEOF @@ -19373,6 +19373,26 @@ case $host_os in ;; esac +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -fvisibility=hidden" +CFLAGS_VISIBILITY= +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #if defined(__CYGWIN__) || defined(__MINGW32__) + #error No visibility support + #endif + extern __attribute__((__visibility__("default"))) int x; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + CFLAGS_VISIBILITY=-fvisibility=hidden +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +CFLAGS="$save_CFLAGS" +OS_CFLAGS="$OS_CFLAGS $CFLAGS_VISIBILITY" + + ac_config_files="$ac_config_files Makefile doc/Makefile xfont2.pc" @@ -19970,7 +19990,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libXfont2 $as_me 2.0.1, which was +This file was extended by libXfont2 $as_me 2.0.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20036,7 +20056,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libXfont2 config.status 2.0.1 +libXfont2 config.status 2.0.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/lib/libXfont2/configure.ac b/lib/libXfont2/configure.ac index 13c8c97ea..74b149365 100644 --- a/lib/libXfont2/configure.ac +++ b/lib/libXfont2/configure.ac @@ -21,7 +21,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([libXfont2], [2.0.1], +AC_INIT([libXfont2], [2.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXfont2]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) @@ -217,6 +217,23 @@ case $host_os in OS_CFLAGS= ;; esac + +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -fvisibility=hidden" +CFLAGS_VISIBILITY= +AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([[ + #if defined(__CYGWIN__) || defined(__MINGW32__) + #error No visibility support + #endif + extern __attribute__((__visibility__("default"))) int x; + ]])], + [CFLAGS_VISIBILITY=-fvisibility=hidden], + [] +) +CFLAGS="$save_CFLAGS" +OS_CFLAGS="$OS_CFLAGS $CFLAGS_VISIBILITY" + AC_SUBST([OS_CFLAGS]) AC_CONFIG_FILES([Makefile diff --git a/lib/libXfont2/src/FreeType/ftfuncs.c b/lib/libXfont2/src/FreeType/ftfuncs.c index bbd4db497..e7c802648 100644 --- a/lib/libXfont2/src/FreeType/ftfuncs.c +++ b/lib/libXfont2/src/FreeType/ftfuncs.c @@ -623,7 +623,7 @@ FreeTypeInstanceFindGlyph(unsigned idx_in, int flags, FTInstancePtr instance, offset = idx - segment * FONTSEGMENTSIZE; if((*available)[segment] == NULL) { - (*available)[segment] = calloc(FONTSEGMENTSIZE, sizeof(int *)); + (*available)[segment] = calloc(FONTSEGMENTSIZE, sizeof(int)); if((*available)[segment] == NULL) return AllocError; } diff --git a/lib/libXfont2/src/FreeType/fttools.c b/lib/libXfont2/src/FreeType/fttools.c index 7c0bd9b81..0329fae3b 100644 --- a/lib/libXfont2/src/FreeType/fttools.c +++ b/lib/libXfont2/src/FreeType/fttools.c @@ -100,7 +100,6 @@ FTGetName(FT_Face face, int nid, int pid, int eid, FT_SfntName *name_return) case TT_PLATFORM_MICROSOFT: if(name.language_id != TT_MS_LANGID_ENGLISH_UNITED_STATES && name.language_id != TT_MS_LANGID_ENGLISH_UNITED_KINGDOM) - break; continue; break; default: diff --git a/lib/libXfont2/src/bitmap/bitscale.c b/lib/libXfont2/src/bitmap/bitscale.c index 22747a9fd..00adcc6b0 100644 --- a/lib/libXfont2/src/bitmap/bitscale.c +++ b/lib/libXfont2/src/bitmap/bitscale.c @@ -1477,6 +1477,10 @@ BitmapScaleBitmaps(FontPtr pf, /* scaled font */ lastRow = pfi->lastRow; nchars = (lastRow - firstRow + 1) * (lastCol - firstCol + 1); + if (nchars <= 0) { + goto bail; + } + glyph = pf->glyph; for (i = 0; i < nchars; i++) { diff --git a/lib/libXfont2/src/bitmap/pcfread.c b/lib/libXfont2/src/bitmap/pcfread.c index dab1c44fe..ae34c28ce 100644 --- a/lib/libXfont2/src/bitmap/pcfread.c +++ b/lib/libXfont2/src/bitmap/pcfread.c @@ -45,6 +45,7 @@ from The Open Group. #include <stdarg.h> #include <stdint.h> +#include <string.h> void pcfError(const char* message, ...) @@ -311,11 +312,19 @@ pcfGetProperties(FontInfoPtr pFontInfo, FontFilePtr file, if (IS_EOF(file)) goto Bail; position += string_size; for (i = 0; i < nprops; i++) { + if (props[i].name >= string_size) { + pcfError("pcfGetProperties(): String starts out of bounds (%ld/%d)\n", props[i].name, string_size); + goto Bail; + } props[i].name = MakeAtom(strings + props[i].name, - strlen(strings + props[i].name), TRUE); + strnlen(strings + props[i].name, string_size - props[i].name), TRUE); if (isStringProp[i]) { + if (props[i].value >= string_size) { + pcfError("pcfGetProperties(): String starts out of bounds (%ld/%d)\n", props[i].value, string_size); + goto Bail; + } props[i].value = MakeAtom(strings + props[i].value, - strlen(strings + props[i].value), TRUE); + strnlen(strings + props[i].value, string_size - props[i].value), TRUE); } } free(strings); diff --git a/lib/libXfont2/src/fc/fserve.c b/lib/libXfont2/src/fc/fserve.c index 42c4028c0..708fc35ef 100644 --- a/lib/libXfont2/src/fc/fserve.c +++ b/lib/libXfont2/src/fc/fserve.c @@ -649,8 +649,8 @@ fs_get_reply (FSFpePtr conn, int *error) */ if (rep->length > MAX_REPLY_LENGTH) { - ErrorF("fserve: reply length %d > MAX_REPLY_LENGTH, disconnecting" - " from font server\n", rep->length); + ErrorF("fserve: reply length %ld > MAX_REPLY_LENGTH, disconnecting" + " from font server\n", (long)rep->length); _fs_connection_died (conn); *error = FSIO_ERROR; return 0; @@ -2856,14 +2856,12 @@ _fs_client_access (FSFpePtr conn, pointer client, Bool sync) if (crac.num_auths == 0) { authorizations = padding; authlen = 4; - } else { - authlen = (authlen + 3) & ~0x3; } crac.length = (sizeof (fsCreateACReq) + authlen) >> 2; crac.acid = cur->acid; _fs_add_req_log(conn, FS_CreateAC); _fs_write(conn, (char *) &crac, sizeof (fsCreateACReq)); - _fs_write(conn, authorizations, authlen); + _fs_write_pad(conn, authorizations, authlen); /* ignore reply; we don't even care about it */ conn->curacid = 0; cur->auth_generation = client_auth_generation(client); diff --git a/lib/libXfont2/src/fc/fstrans.c b/lib/libXfont2/src/fc/fstrans.c index 66bc97806..902ef3650 100644 --- a/lib/libXfont2/src/fc/fstrans.c +++ b/lib/libXfont2/src/fc/fstrans.c @@ -28,5 +28,3 @@ #define FONT_t #define TRANS_CLIENT #include <X11/Xtrans/transport.c> -/* inhibit warning about is_numeric */ -static inline void foo(void) { (void) is_numeric("a"); } diff --git a/lib/libXfont2/src/fontfile/fontdir.c b/lib/libXfont2/src/fontfile/fontdir.c index 4ce24732e..996b7d139 100644 --- a/lib/libXfont2/src/fontfile/fontdir.c +++ b/lib/libXfont2/src/fontfile/fontdir.c @@ -400,8 +400,10 @@ PatternMatch(char *pat, int patdashes, char *string, int stringdashes) } } case '?': - if (*string++ == XK_minus) + if ((t = *string++) == XK_minus) stringdashes--; + if (!t) + return 0; break; case '\0': return (*string == '\0'); |