Coverity DIVIDE_BY_ZERO - CID 12439 - plugins/mag/src/mag.cpp - in function: MagScreen::paintSimple() - In expressions "1. / this->width" and "1. / this->width" (2x) , division by expression "this->width" which may be zero has undefined behavior.

Bug #1101518 reported by Product Strategy Coverity Bug Uploader on 2013-01-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz
Medium
MC Return
0.9.9
Medium
Unassigned

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: 12439
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/mag/src/mag.cpp
Function: MagScreen::paintSimple()
Code snippet:
415 x1 + cx, screen->height () - y2 + cy, cw, ch);
416
417 if (target == GL_TEXTURE_2D)
418 {
CID 12439 - DIVIDE_BY_ZERO
In expression "1. / this->width", division by expression "this->width" which may be zero has undefined behavior.
In expression "1. / this->width", division by expression "this->width" which may be zero has undefined behavior.
419 pw = 1.0 / width;
420 ph = 1.0 / height;
421 }
422 else
423 {
424 pw = 1.0;

MC Return (mc-return) on 2013-07-06
Changed in compiz:
milestone: none → 0.9.10.0
summary: - Coverity DIVIDE_BY_ZERO - CID 12439
+ Coverity DIVIDE_BY_ZERO - CID 12439 - plugins/mag/src/mag.cpp - in
+ function: MagScreen::paintSimple() - In expressions "1. / this->width"
+ and "1. / this->width" (2x) , division by expression "this->width" which
+ may be zero has undefined behavior.
MC Return (mc-return) on 2013-07-07
Changed in compiz:
status: New → Triaged
assignee: nobody → MC Return (mc-return)
Changed in compiz:
milestone: 0.9.10.0 → 0.9.10.2
MC Return (mc-return) on 2013-07-24
Changed in compiz:
milestone: 0.9.10.2 → 0.9.11.0
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers