mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-08 09:30:16 +01:00
Bug #6818: Avoid infinite loop in exaLog2() with negative arguments.
This commit is contained in:
parent
36756fdb2d
commit
930b9a069a
1 changed files with 1 additions and 1 deletions
|
|
@ -158,7 +158,7 @@ exaLog2(int val)
|
|||
{
|
||||
int bits;
|
||||
|
||||
if (!val)
|
||||
if (val <= 0)
|
||||
return 0;
|
||||
for (bits = 0; val != 0; bits++)
|
||||
val >>= 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue