bcc36b87fb
The way nearestPowerOfTwo is currently defined allows for the possibility of left-shifting an int by 32 bits or more, which is undefined behavior on platforms where int is 32 bits, and is something that can happen here if `s` is equal to 31 by the end of the loop. Noted by Coverity as CID 1291191. This patch takes an algorithm to perform the same operation from Hank Warren Jr.'s book "Hacker's Delight", which should avoid UB. REVIEW:126540 |
||
---|---|---|
.. | ||
autotests | ||
anidata.cpp | ||
anidata_p.h | ||
CMakeLists.txt | ||
kwinanimationeffect.cpp | ||
kwinanimationeffect.h | ||
kwinconfig.h.cmake | ||
kwineffects.cpp | ||
kwineffects.h | ||
kwinglcolorcorrection.cpp | ||
kwinglcolorcorrection.h | ||
kwinglcolorcorrection_p.h | ||
kwinglobals.h | ||
kwinglplatform.cpp | ||
kwinglplatform.h | ||
kwingltexture.cpp | ||
kwingltexture.h | ||
kwingltexture_p.h | ||
kwinglutils.cpp | ||
kwinglutils.h | ||
kwinglutils_funcs.cpp | ||
kwinglutils_funcs.h | ||
kwinxrenderutils.cpp | ||
kwinxrenderutils.h | ||
logging.cpp | ||
logging_p.h | ||
Mainpage.dox | ||
Messages.sh |