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
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz
Triaged
Medium
MC Return
0.9.9
New
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;

Revision history for this message
Product Strategy Coverity Bug Uploader (coverity-uploader) wrote : compiz-0.9.9: /tmp/buildd/compiz-0.9.9~daily13.01.14/plugins/mag/src/mag.cpp

Source file with Coverity annotations.

Changed in compiz:
importance: Undecided → Medium
MC Return (mc-return)
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)
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)
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.