Coverity FORWARD_NULL - CID 12452 - plugins/animation/src/extensionplugin.cpp - Dynamic cast to pointer "dynamic_cast <DodgeAnim *>(curAnim)" can return NULL, passing null pointer "dynamic_cast <DodgeAnim *>(curAnim)" to function "DodgeAnim::calculateDodgeAmounts()", which dereferences it.

Bug #1101458 reported by Product Strategy Coverity Bug Uploader
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz
Triaged
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: 12452
Checker: FORWARD_NULL
Category: dynamic_cast
CWE definition: http://cwe.mitre.org/data/definitions/476.html
File: /tmp/buildd/compiz-0.9.9~daily13.01.14/plugins/animation/src/extensionplugin.cpp
Function: ExtensionPluginAnimation::prePreparePaintGeneral()
Code snippet:
268 if (!dodgeData || !dodgeData->dodgeChainStart ||
269 !dodgeData->isDodgeSubject)
270 continue;
271
CID 12452 - FORWARD_NULL
Dynamic cast to pointer "dynamic_cast <DodgeAnim *>(curAnim)" can return NULL.
Passing null pointer "dynamic_cast <DodgeAnim *>(curAnim)" to function "DodgeAnim::calculateDodgeAmounts()", which dereferences it.
272 dynamic_cast<DodgeAnim *> (curAnim)->calculateDodgeAmounts ();
273 }
274
275 // TODO consider removing this loop and skipPostPrepareScreen
276 for (CompWindowVector::reverse_iterator rit = mLastClientList.rbegin ();
277 rit != mLastClientList.rend (); ++rit)

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/animation/src/extensionplugin.cpp

Source file with Coverity annotations.

Changed in compiz:
importance: Undecided → High
MC Return (mc-return)
summary: - Coverity FORWARD_NULL - CID 12452
+ Coverity FORWARD_NULL - CID 12452 -
+ plugins/animation/src/extensionplugin.cpp - Dynamic cast to pointer
+ "dynamic_cast <DodgeAnim *>(curAnim)" can return NULL, passing null
+ pointer "dynamic_cast <DodgeAnim *>(curAnim)" to function
+ "DodgeAnim::calculateDodgeAmounts()", which dereferences it.
Stephen M. Webb (bregma)
Changed in compiz:
milestone: none → 0.9.11.0
importance: High → Low
status: New → Triaged
no longer affects: compiz/0.9.9
Stephen M. Webb (bregma)
no longer affects: compiz/0.9.10
Changed in compiz:
importance: Low → Medium
milestone: 0.9.11.0 → 0.9.12.0
Stephen M. Webb (bregma)
Changed in compiz:
milestone: 0.9.12.0 → 0.9.12.1
Stephen M. Webb (bregma)
Changed in compiz:
milestone: 0.9.12.1 → 0.9.12.2
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.