kwin/libkwineffects
Michael Pyne bcc36b87fb Avoid undefined behavior in nearestPowerOfTwo.
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
2015-12-28 17:08:15 -05:00
..
autotests Unit test for WindowQuadList::makeGrid and ::makeRegularGrid 2013-11-25 09:27:31 +01:00
anidata.cpp optimize string operations 2015-11-05 14:14:06 +00:00
anidata_p.h add effect debug interface and dbus export 2013-03-28 20:31:02 +01:00
CMakeLists.txt Revert "Handle conflicts between epoxy and manually resolved function pointers" 2015-11-17 14:58:59 +01:00
kwinanimationeffect.cpp optimize string operations 2015-11-05 14:14:06 +00:00
kwinanimationeffect.h optimize string operations 2015-11-05 14:14:06 +00:00
kwinconfig.h.cmake Bind building of glx support on whether epoxy has a glx header 2015-11-03 09:29:31 +01:00
kwineffects.cpp optimize string operations 2015-11-05 14:14:06 +00:00
kwineffects.h support the slide protocol 2015-09-14 16:39:39 +02:00
kwinglcolorcorrection.cpp [kwineffects] Runtime checks for GLES in ColorCorrection 2015-11-03 09:29:31 +01:00
kwinglcolorcorrection.h Replace NULL with nullptr in libkwineffects 2014-01-08 11:55:49 +01:00
kwinglcolorcorrection_p.h Remove most calls to checkGLError() 2014-11-25 21:57:57 +01:00
kwinglobals.h Drop PreventScreenLocking electric border 2015-10-21 08:14:50 +02:00
kwinglplatform.cpp optimize string operations 2015-11-05 14:14:06 +00:00
kwinglplatform.h optimize string operations 2015-11-05 14:14:06 +00:00
kwingltexture.cpp optimize string operations 2015-11-05 14:14:06 +00:00
kwingltexture.h Check GL version and/or extension for using texture format GL_R8 2015-02-18 09:09:50 +01:00
kwingltexture_p.h Check GL version and/or extension for using texture format GL_R8 2015-02-18 09:09:50 +01:00
kwinglutils.cpp Avoid undefined behavior in nearestPowerOfTwo. 2015-12-28 17:08:15 -05:00
kwinglutils.h Avoid undefined behavior in nearestPowerOfTwo. 2015-12-28 17:08:15 -05:00
kwinglutils_funcs.cpp Don't query for GL_CONTEXT_FLAGS if not at least OpenGL 3.0 2015-11-19 11:20:33 +01:00
kwinglutils_funcs.h Revert "Handle conflicts between epoxy and manually resolved function pointers" 2015-11-17 14:58:59 +01:00
kwinxrenderutils.cpp [libkwineffects] Introduce logging categories for libkwineffects 2015-07-31 12:16:15 +02:00
kwinxrenderutils.h Add XRenderUtils::findPictFormat() and findPictFormatInfo() 2014-09-01 17:45:58 +02:00
logging.cpp [libkwineffects] Introduce logging categories for libkwineffects 2015-07-31 12:16:15 +02:00
logging_p.h [libkwineffects] Introduce logging categories for libkwineffects 2015-07-31 12:16:15 +02:00
Mainpage.dox
Messages.sh