[PATCH libXi 1/3] Fix potential corruption in mask_len handling
Alan Coopersmith
alan.coopersmith at oracle.com
Tue May 28 13:10:02 PDT 2013
On 05/28/13 10:16 AM, walter harms wrote:
>
>
> Am 28.05.2013 17:55, schrieb Alan Coopersmith:
>> On 05/28/13 12:22 AM, walter harms wrote:
>>> Is the INT_MAX needed here ? running X on 16bit machines seems very odd
>>> (is that possible ?)
>>
>> 16-bits would be SHORT_MAX. INT_MAX is 32-bits on all platforms X
>> currently
>> supports.
>>
>
> This was not my point. 0xffffff is less then INT_MAX. so this condition
> will apply before INT_MAX any time.
Ah, I misunderstood - I see what you're asking now. With the tighter
condition added, I suppose the INT_MAX check is redundant (and may be
optimized out if the compiler is smart enough).
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Engineering - http://blogs.oracle.com/alanc
More information about the xorg-devel
mailing list