desktop-packages team mailing list archive
-
desktop-packages team
-
Mailing list archive
-
Message #83919
[Bug 1101541] Re: Coverity DIVIDE_BY_ZERO - CID 12435 - plugins/cube/src/cube.cpp - in function: PrivateCubeScreen::updateGeometry(int, int) - Several divisions by expression "sides" which may be zero has undefined behavior. Note: screen->vpSize ().width () will always return a value >= 1.
** Changed in: compiz
Status: Fix Committed => Fix Released
** Changed in: compiz
Milestone: 0.9.10.2 => None
** Changed in: compiz/0.9.9
Status: New => Won't Fix
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to compiz in Ubuntu.
https://bugs.launchpad.net/bugs/1101541
Title:
Coverity DIVIDE_BY_ZERO - CID 12435 - plugins/cube/src/cube.cpp - in
function: PrivateCubeScreen::updateGeometry(int, int) - Several
divisions by expression "sides" which may be zero has undefined
behavior. Note: screen->vpSize ().width () will always return a value
>= 1.
Status in Compiz:
Fix Released
Status in Compiz 0.9.9 series:
Won't Fix
Status in “compiz” package in Ubuntu:
Fix Released
Bug description:
This bug is exported from the Coverity Integration Manager on Canonical's servers. For information on how this is done please see this website: https://wiki.ubuntu.com/CanonicalProductStrategy/Coverity
CID: 12435
Checker: DIVIDE_BY_ZERO
Category: No category available
CWE definition: http://cwe.mitre.org/data/definitions/571.html
File: /tmp/buildd/compiz-0.9.9~daily13.01.14/plugins/cube/src/cube.cpp
Function: PrivateCubeScreen::updateGeometry(int, int)
Code snippet:
269 *v++ = 0.0f;
270
271 for (i = sides; i >= 0; i--)
272 {
CID 12435 - DIVIDE_BY_ZERO
In expression "3.14159 / sides", division by expression "sides" which may be zero has undefined behavior.
In expression "i * 2 * 3.14159 / sides", division by expression "sides" which may be zero has undefined behavior.
273 *v++ = radius * sinf (i * 2 * M_PI / sides + M_PI / sides);
274 *v++ = -0.5 * invert;
CID 12435 - DIVIDE_BY_ZERO
In expression "3.14159 / sides", division by expression "sides" which may be zero has undefined behavior.
In expression "i * 2 * 3.14159 / sides", division by expression "sides" which may be zero has undefined behavior.
275 *v++ = radius * cosf (i * 2 * M_PI / sides + M_PI / sides);
276 }
277
278 mInvert = invert;
To manage notifications about this bug go to:
https://bugs.launchpad.net/compiz/+bug/1101541/+subscriptions