aboutsummaryrefslogtreecommitdiff
path: root/libXfont/src/fontfile
diff options
context:
space:
mode:
authorMike DePaulo <mikedep333@gmail.com>2015-05-09 20:15:27 -0400
committerMike DePaulo <mikedep333@gmail.com>2015-05-09 20:20:02 -0400
commitbec4be4c48239613ed1c704ae71bf08754eef711 (patch)
tree3bcc6202527e53611fd6f66ea147bda48e6e6b14 /libXfont/src/fontfile
parent13c50b4df1dc97026afb7c783378ade4929f24f1 (diff)
downloadvcxsrv-bec4be4c48239613ed1c704ae71bf08754eef711.tar.gz
vcxsrv-bec4be4c48239613ed1c704ae71bf08754eef711.tar.bz2
vcxsrv-bec4be4c48239613ed1c704ae71bf08754eef711.zip
Updated to libXfont 1.5.1
In addition to some other changes, the following CVEs have been fixed: bdfReadProperties: property count needs range check [CVE-2015-1802] bdfReadCharacters: bailout if a char's bitmap cannot be read [CVE-2015-1803] bdfReadCharacters: ensure metrics fit into xCharInfo struct [CVE-2015-1804]
Diffstat (limited to 'libXfont/src/fontfile')
-rw-r--r--libXfont/src/fontfile/Makefile.in23
-rw-r--r--libXfont/src/fontfile/fileio.c5
-rw-r--r--libXfont/src/fontfile/filewr.c12
3 files changed, 28 insertions, 12 deletions
diff --git a/libXfont/src/fontfile/Makefile.in b/libXfont/src/fontfile/Makefile.in
index 527859c98..3b0260168 100644
--- a/libXfont/src/fontfile/Makefile.in
+++ b/libXfont/src/fontfile/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@@ -80,12 +90,11 @@ build_triplet = @build@
host_triplet = @host@
@X_BZIP2_FONT_COMPRESSION_TRUE@am__append_1 = bunzip2.c
subdir = src/fontfile
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h \
$(top_builddir)/include/X11/fonts/fontconf.h
@@ -168,6 +177,7 @@ am__define_uniq_tagged_files = \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
@@ -344,7 +354,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/fontfile/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign src/fontfile/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -630,6 +639,8 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am
+.PRECIOUS: Makefile
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/libXfont/src/fontfile/fileio.c b/libXfont/src/fontfile/fileio.c
index 80af51193..d44cecdc4 100644
--- a/libXfont/src/fontfile/fileio.c
+++ b/libXfont/src/fontfile/fileio.c
@@ -36,6 +36,9 @@ in this Software without prior written authorization from The Open Group.
#ifndef O_BINARY
#define O_BINARY O_RDONLY
#endif
+#ifndef O_CLOEXEC
+#define O_CLOEXEC 0
+#endif
FontFilePtr
FontFileOpen (const char *name)
@@ -44,7 +47,7 @@ FontFileOpen (const char *name)
int len;
BufFilePtr raw, cooked;
- fd = open (name, O_BINARY);
+ fd = open (name, O_BINARY|O_CLOEXEC);
if (fd < 0)
return 0;
raw = BufFileOpenRead (fd);
diff --git a/libXfont/src/fontfile/filewr.c b/libXfont/src/fontfile/filewr.c
index bcc7b1eda..859a0bec1 100644
--- a/libXfont/src/fontfile/filewr.c
+++ b/libXfont/src/fontfile/filewr.c
@@ -33,17 +33,19 @@ in this Software without prior written authorization from The Open Group.
#endif
#include <X11/fonts/fntfilio.h>
#include <X11/Xos.h>
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+#ifndef O_CLOEXEC
+#define O_CLOEXEC 0
+#endif
FontFilePtr
FontFileOpenWrite (const char *name)
{
int fd;
-#if defined(WIN32) || defined(__CYGWIN__)
- fd = open (name, O_CREAT|O_TRUNC|O_RDWR|O_BINARY, 0666);
-#else
- fd = creat (name, 0666);
-#endif
+ fd = open (name, O_CREAT|O_TRUNC|O_RDWR|O_BINARY|O_CLOEXEC, 0666);
if (fd < 0)
return 0;
return (FontFilePtr) BufFileOpenWrite (fd);