Module Name: xsrc
Committed By: mrg
Date: Wed Nov 29 01:56:59 UTC 2017
Modified Files:
xsrc/external/mit/libXcursor/include: config.h
xsrc/external/mit/libXfont/dist/src/bitmap: pcfread.c
xsrc/external/mit/libXfont/dist/src/fontfile: dirfile.c fileio.c
xsrc/external/mit/libXfont/include: config.h
Removed Files:
xsrc/external/mit/libXfont2/dist/m4: attributes.m4
Log Message:
merge libXcursor 1.1.15, libXfont 1.5.4 and libXfont2 2.0.3.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/libXcursor/include/config.h
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/libXfont/dist/src/fontfile/dirfile.c
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/libXfont/dist/src/fontfile/fileio.c
cvs rdiff -u -r1.8 -r1.9 xsrc/external/mit/libXfont/include/config.h
cvs rdiff -u -r1.1.1.1 -r0 xsrc/external/mit/libXfont2/dist/m4/attributes.m4
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/libXcursor/include/config.h
diff -u xsrc/external/mit/libXcursor/include/config.h:1.3 xsrc/external/mit/libXcursor/include/config.h:1.4
--- xsrc/external/mit/libXcursor/include/config.h:1.3 Sun Nov 21 06:40:44 2010
+++ xsrc/external/mit/libXcursor/include/config.h Wed Nov 29 01:56:58 2017
@@ -48,7 +48,7 @@
#define PACKAGE_NAME "libXcursor"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "libXcursor 1.1.11"
+#define PACKAGE_STRING "libXcursor 1.1.15"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libXcursor"
@@ -57,7 +57,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.1.11"
+#define PACKAGE_VERSION "1.1.15"
/* Major version of this package */
#define PACKAGE_VERSION_MAJOR 1
@@ -66,10 +66,10 @@
#define PACKAGE_VERSION_MINOR 1
/* Patch version of this package */
-#define PACKAGE_VERSION_PATCHLEVEL 11
+#define PACKAGE_VERSION_PATCHLEVEL 15
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
-#define VERSION "1.1.11"
+#define VERSION "1.1.15"
Index: xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c
diff -u xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c:1.4 xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c:1.5
--- xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c:1.4 Sun Mar 5 01:07:05 2017
+++ xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c Wed Nov 29 01:56:58 2017
@@ -44,6 +44,7 @@ from The Open Group.
#include <stdarg.h>
#include <stdint.h>
+#include <string.h>
void
pcfError(const char* message, ...)
@@ -310,11 +311,19 @@ pcfGetProperties(FontInfoPtr pFontInfo,
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);
Index: xsrc/external/mit/libXfont/dist/src/fontfile/dirfile.c
diff -u xsrc/external/mit/libXfont/dist/src/fontfile/dirfile.c:1.4 xsrc/external/mit/libXfont/dist/src/fontfile/dirfile.c:1.5
--- xsrc/external/mit/libXfont/dist/src/fontfile/dirfile.c:1.4 Wed Feb 25 19:59:36 2015
+++ xsrc/external/mit/libXfont/dist/src/fontfile/dirfile.c Wed Nov 29 01:56:59 2017
@@ -41,6 +41,7 @@ in this Software without prior written a
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <fcntl.h>
#include <errno.h>
#include <limits.h>
@@ -60,8 +61,9 @@ FontFileReadDirectory (const char *direc
char dir_file[MAXFONTFILENAMELEN];
char dir_path[MAXFONTFILENAMELEN];
char *ptr;
- FILE *file;
- int count,
+ FILE *file = 0;
+ int file_fd,
+ count,
num_fonts,
status;
struct stat statb;
@@ -91,7 +93,14 @@ FontFileReadDirectory (const char *direc
if (dir_file[strlen(dir_file) - 1] != '/')
strcat(dir_file, "/");
strcat(dir_file, FontDirFile);
+#ifndef WIN32
+ file_fd = open(dir_file, O_RDONLY | O_NOFOLLOW);
+ if (file_fd >= 0) {
+ file = fdopen(file_fd, "rt");
+ }
+#else
file = fopen(dir_file, "rt");
+#endif
if (file) {
#ifndef WIN32
if (fstat (fileno(file), &statb) == -1)
@@ -261,7 +270,8 @@ ReadFontAlias(char *directory, Bool isFi
char alias[MAXFONTNAMELEN];
char font_name[MAXFONTNAMELEN];
char alias_file[MAXFONTFILENAMELEN];
- FILE *file;
+ int file_fd;
+ FILE *file = 0;
FontDirectoryPtr dir;
int token;
char *lexToken;
@@ -279,7 +289,16 @@ ReadFontAlias(char *directory, Bool isFi
strcat(alias_file, "/");
strcat(alias_file, FontAliasFile);
}
+
+#ifndef WIN32
+ file_fd = open(alias_file, O_RDONLY | O_NOFOLLOW);
+ if (file_fd >= 0) {
+ file = fdopen(file_fd, "rt");
+ }
+#else
file = fopen(alias_file, "rt");
+#endif
+
if (!file)
return ((errno == ENOENT) ? Successful : BadFontPath);
if (!dir)
Index: xsrc/external/mit/libXfont/dist/src/fontfile/fileio.c
diff -u xsrc/external/mit/libXfont/dist/src/fontfile/fileio.c:1.2 xsrc/external/mit/libXfont/dist/src/fontfile/fileio.c:1.3
--- xsrc/external/mit/libXfont/dist/src/fontfile/fileio.c:1.2 Thu Sep 18 19:23:10 2014
+++ xsrc/external/mit/libXfont/dist/src/fontfile/fileio.c Wed Nov 29 01:56:59 2017
@@ -39,6 +39,9 @@ in this Software without prior written a
#ifndef O_CLOEXEC
#define O_CLOEXEC 0
#endif
+#ifndef O_NOFOLLOW
+#define O_NOFOLLOW 0
+#endif
FontFilePtr
FontFileOpen (const char *name)
@@ -47,7 +50,7 @@ FontFileOpen (const char *name)
int len;
BufFilePtr raw, cooked;
- fd = open (name, O_BINARY|O_CLOEXEC);
+ fd = open (name, O_BINARY|O_CLOEXEC|O_NOFOLLOW);
if (fd < 0)
return 0;
raw = BufFileOpenRead (fd);
Index: xsrc/external/mit/libXfont/include/config.h
diff -u xsrc/external/mit/libXfont/include/config.h:1.8 xsrc/external/mit/libXfont/include/config.h:1.9
--- xsrc/external/mit/libXfont/include/config.h:1.8 Sun Mar 5 01:07:05 2017
+++ xsrc/external/mit/libXfont/include/config.h Wed Nov 29 01:56:59 2017
@@ -75,7 +75,7 @@
#define PACKAGE_NAME "libXfont"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "libXfont 1.5.2"
+#define PACKAGE_STRING "libXfont 1.5.4"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libXfont"
@@ -84,7 +84,7 @@
#undef PACKAGE_URL
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.5.2"
+#define PACKAGE_VERSION "1.5.4"
/* Major version of this package */
#define PACKAGE_VERSION_MAJOR 1
@@ -93,7 +93,7 @@
#define PACKAGE_VERSION_MINOR 5
/* Patch version of this package */
-#define PACKAGE_VERSION_PATCHLEVEL 2
+#define PACKAGE_VERSION_PATCHLEVEL 4
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
@@ -127,7 +127,7 @@
/* Version number of package */
-#define VERSION "1.5.2"
+#define VERSION "1.5.4"
/* Support bdf format bitmap font files */
#define XFONT_BDFFORMAT 1