X-Git-Url: https://git.piment-noir.org/?p=deb_xorg-server.git;a=blobdiff_plain;f=debian%2Fpatches%2F122_xext_fix_card32_overflow_in_xauth.patch;fp=debian%2Fpatches%2F122_xext_fix_card32_overflow_in_xauth.patch;h=6f8cfab3b15262cbd63e1b420d816cf1c1fe12c4;hp=0000000000000000000000000000000000000000;hb=7217e0ca50bba73dad94782e67980aeeb24ab693;hpb=a09e091a5c996d46a398abb27b06fe504591673f diff --git a/debian/patches/122_xext_fix_card32_overflow_in_xauth.patch b/debian/patches/122_xext_fix_card32_overflow_in_xauth.patch new file mode 100644 index 0000000..6f8cfab --- /dev/null +++ b/debian/patches/122_xext_fix_card32_overflow_in_xauth.patch @@ -0,0 +1,25 @@ +diff --git a/Xext/security.c b/Xext/security.c +index 3699510..5e5a703 100644 +--- a/Xext/security.c ++++ b/Xext/security.c +@@ -260,9 +260,9 @@ SecurityComputeAuthorizationTimeout(SecurityAuthorizationPtr pAuth, + /* maxSecs is the number of full seconds that can be expressed in + * 32 bits worth of milliseconds + */ +- CARD32 maxSecs = (CARD32) (~0) / (CARD32) MILLI_PER_SECOND; ++ CARD32 maxSecs = (CARD32) (MAXINT) / (CARD32) MILLI_PER_SECOND; + +- if (seconds > maxSecs) { /* only come here if we want to wait more than 49 days */ ++ if (seconds > maxSecs) { /* only come here if we want to wait more than 24 days */ + pAuth->secondsRemaining = seconds - maxSecs; + return maxSecs * MILLI_PER_SECOND; + } +@@ -296,8 +296,6 @@ SecurityAuthorizationExpired(OsTimerPtr timer, CARD32 time, pointer pval) + { + SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr) pval; + +- assert(pAuth->timer == timer); +- + if (pAuth->secondsRemaining) { + return SecurityComputeAuthorizationTimeout(pAuth, + pAuth->secondsRemaining);