Module Name: xsrc
Committed By: wiz
Date: Tue Jun 25 20:34:20 UTC 2013
Modified Files:
xsrc/external/mit/libX11/dist/src: FontNames.c GetFPath.c ListExt.c
ModMap.c
Log Message:
Decrease comparison range to avoid tautologies.
(int32 is always smaller than int64_max, even if the latter is shifted 2 bits)
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5 -r1.2 xsrc/external/mit/libX11/dist/src/FontNames.c \
xsrc/external/mit/libX11/dist/src/ModMap.c
cvs rdiff -u -r1.1.1.4 -r1.2 xsrc/external/mit/libX11/dist/src/GetFPath.c \
xsrc/external/mit/libX11/dist/src/ListExt.c
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/libX11/dist/src/FontNames.c
diff -u xsrc/external/mit/libX11/dist/src/FontNames.c:1.1.1.5 xsrc/external/mit/libX11/dist/src/FontNames.c:1.2
--- xsrc/external/mit/libX11/dist/src/FontNames.c:1.1.1.5 Thu May 30 23:04:40 2013
+++ xsrc/external/mit/libX11/dist/src/FontNames.c Tue Jun 25 20:34:20 2013
@@ -66,7 +66,7 @@ int *actualCount) /* RETURN */
if (rep.nFonts) {
flist = Xmalloc (rep.nFonts * sizeof(char *));
- if (rep.length < (LONG_MAX >> 2)) {
+ if (rep.length < (INT_MAX >> 2)) {
rlen = rep.length << 2;
ch = Xmalloc(rlen + 1);
/* +1 to leave room for last null-terminator */
Index: xsrc/external/mit/libX11/dist/src/ModMap.c
diff -u xsrc/external/mit/libX11/dist/src/ModMap.c:1.1.1.5 xsrc/external/mit/libX11/dist/src/ModMap.c:1.2
--- xsrc/external/mit/libX11/dist/src/ModMap.c:1.1.1.5 Thu May 30 23:04:40 2013
+++ xsrc/external/mit/libX11/dist/src/ModMap.c Tue Jun 25 20:34:20 2013
@@ -42,7 +42,7 @@ XGetModifierMapping(register Display *dp
GetEmptyReq(GetModifierMapping, req);
(void) _XReply (dpy, (xReply *)&rep, 0, xFalse);
- if (rep.length < (LONG_MAX >> 2)) {
+ if (rep.length < (INT_MAX >> 2)) {
nbytes = (unsigned long)rep.length << 2;
res = Xmalloc(sizeof (XModifierKeymap));
if (res)
Index: xsrc/external/mit/libX11/dist/src/GetFPath.c
diff -u xsrc/external/mit/libX11/dist/src/GetFPath.c:1.1.1.4 xsrc/external/mit/libX11/dist/src/GetFPath.c:1.2
--- xsrc/external/mit/libX11/dist/src/GetFPath.c:1.1.1.4 Thu May 30 23:04:40 2013
+++ xsrc/external/mit/libX11/dist/src/GetFPath.c Tue Jun 25 20:34:20 2013
@@ -50,7 +50,7 @@ char **XGetFontPath(
if (rep.nPaths) {
flist = Xmalloc(rep.nPaths * sizeof (char *));
- if (rep.length < (LONG_MAX >> 2)) {
+ if (rep.length < (INT_MAX >> 2)) {
nbytes = (unsigned long) rep.length << 2;
ch = Xmalloc (nbytes + 1);
/* +1 to leave room for last null-terminator */
Index: xsrc/external/mit/libX11/dist/src/ListExt.c
diff -u xsrc/external/mit/libX11/dist/src/ListExt.c:1.1.1.4 xsrc/external/mit/libX11/dist/src/ListExt.c:1.2
--- xsrc/external/mit/libX11/dist/src/ListExt.c:1.1.1.4 Thu May 30 23:04:40 2013
+++ xsrc/external/mit/libX11/dist/src/ListExt.c Tue Jun 25 20:34:20 2013
@@ -55,7 +55,7 @@ char **XListExtensions(
if (rep.nExtensions) {
list = Xmalloc (rep.nExtensions * sizeof (char *));
- if (rep.length < (LONG_MAX >> 2)) {
+ if (rep.length < (INT_MAX >> 2)) {
rlen = rep.length << 2;
ch = Xmalloc (rlen + 1);
/* +1 to leave room for last null-terminator */