[PATCH] Xext: "xauth generate" with large timeout crashes Xorg #27134 .

Keith Packard keithp at keithp.com
Mon Apr 12 22:27:13 PDT 2010


On Tue, 13 Apr 2010 10:16:20 +0530, Arvind Umrao <Arvind.Umrao at Sun.COM> wrote:

>       CARD32 maxSecs = (CARD32)(~0) / (CARD32)MILLI_PER_SECOND;
> +    CARD32 nowSec = GetTimeInMillis()/ (CARD32)MILLI_PER_SECOND;
> 
> -    if (seconds>  maxSecs)
> -    { /* only come here if we want to wait more than 49 days */
> -	pAuth->secondsRemaining = seconds - maxSecs;
> -	return maxSecs * MILLI_PER_SECOND;
> +    CARD32 maxPossibleSec = maxSecs - nowSec;

What happens when GetTimeInMillis() returns (CARD32)(~0)?

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100412/1404726b/attachment.pgp>


More information about the xorg-devel mailing list