aboutsummaryrefslogtreecommitdiff
path: root/libX11/src/Font.c
diff options
context:
space:
mode:
Diffstat (limited to 'libX11/src/Font.c')
-rw-r--r--libX11/src/Font.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libX11/src/Font.c b/libX11/src/Font.c
index a32f740bd..ac1802428 100644
--- a/libX11/src/Font.c
+++ b/libX11/src/Font.c
@@ -588,7 +588,7 @@ _XF86BigfontQueryFont (
if (!(extcodes->serverCapabilities & CAP_VerifiedLocal)) {
struct shmid_ds buf;
if (!(shmctl(reply.shmid, IPC_STAT, &buf) >= 0
- && reply.nCharInfos < (LONG_MAX / sizeof(XCharStruct))
+ && reply.nCharInfos < (INT_MAX / sizeof(XCharStruct))
&& buf.shm_segsz >= reply.shmsegoffset + reply.nCharInfos * sizeof(XCharStruct) + sizeof(CARD32)
&& *(CARD32 *)(addr + reply.shmsegoffset + reply.nCharInfos * sizeof(XCharStruct)) == extcodes->serverSignature)) {
shmdt(addr);