Module Name: xsrc
Committed By: christos
Date: Fri Feb 6 19:29:06 UTC 2015
Modified Files:
xsrc/external/mit/xorg-server/dist/include: regionstr.h
Log Message:
fix signed/unsigned comparison.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/xorg-server/dist/include/regionstr.h
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/xorg-server/dist/include/regionstr.h
diff -u xsrc/external/mit/xorg-server/dist/include/regionstr.h:1.2 xsrc/external/mit/xorg-server/dist/include/regionstr.h:1.3
--- xsrc/external/mit/xorg-server/dist/include/regionstr.h:1.2 Tue Dec 9 14:26:18 2014
+++ xsrc/external/mit/xorg-server/dist/include/regionstr.h Fri Feb 6 14:29:06 2015
@@ -108,7 +108,7 @@ static inline BoxPtr RegionEnd(RegionPtr
}
static inline size_t RegionSizeof(int n) {
- if (n < ((INT_MAX - sizeof(RegDataRec)) / sizeof(BoxRec)))
+ if (n < 0 || (size_t)n < ((INT_MAX - sizeof(RegDataRec)) / sizeof(BoxRec)))
return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)));
else
return 0;