Coverity NULL_RETURNS - CID 12472 - plugins/scaleaddon/src/scaleaddon.cpp - in function: ScaleAddonScreen::pullWindow(CompAction *, unsigned int, std::vector<CompOption, std::allocator<CompOption>>) - Function "CompOption::findOption(CompOption::Vector &, CompString, unsigned int *)" returns null (checked 81 out of 84 times). Assigning: "opt" = null return value from "CompOption::findOption(CompOption::Vector &, CompString, unsigned int *)". Dereferencing a pointer that might be null "opt" when calling "CompOption::value()".

Bug #1101545 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: 12472
Checker: NULL_RETURNS
Category: No category available
CWE definition: http://cwe.mitre.org/data/definitions/476.html
File: /tmp/buildd/compiz-0.9.9~daily13.01.14/plugins/scaleaddon/src/scaleaddon.cpp
Function: ScaleAddonScreen::pullWindow(CompAction *, unsigned int, std::vector<CompOption, std::allocator<CompOption>>)
Code snippet:
303
304 o.push_back (CompOption ("root", CompOption::TypeInt));
305 o[0].value ().set ((int) screen->root ());
306
CID 12472 - NULL_RETURNS
Function "CompOption::findOption(CompOption::Vector &, CompString, unsigned int *)" returns null (checked 81 out of 84 times).
Assigning: "opt" = null return value from "CompOption::findOption(CompOption::Vector &, CompString, unsigned int *)".
307 opt = CompOption::findOption (sScreen->getOptions (),
308 "initiate_key", 0);
CID 12472 - NULL_RETURNS
Dereferencing a pointer that might be null "opt" when calling "CompOption::value()".
309 action = &opt->value ().action ();
310
311 if (action->terminate ())
312 action->terminate () (action, 0, o);

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

Source file with Coverity annotations.

Changed in compiz:
importance: Undecided → High
MC Return (mc-return)
summary: - Coverity NULL_RETURNS - CID 12472
+ Coverity NULL_RETURNS - CID 12472 -
+ plugins/scaleaddon/src/scaleaddon.cpp - in function:
+ ScaleAddonScreen::pullWindow(CompAction *, unsigned int,
+ std::vector<CompOption, std::allocator<CompOption>>) - Function
+ "CompOption::findOption(CompOption::Vector &, CompString, unsigned int
+ *)" returns null (checked 81 out of 84 times). Assigning: "opt" = null
+ return value from "CompOption::findOption(CompOption::Vector &,
+ CompString, unsigned int *)". Dereferencing a pointer that might be null
+ "opt" when calling "CompOption::value()".
Changed in compiz:
milestone: none → 0.9.10.0
MC Return (mc-return)
Changed in compiz:
milestone: 0.9.10.0 → 0.9.11.0
Stephen M. Webb (bregma)
no longer affects: compiz/0.9.9
Changed in compiz:
importance: High → Medium
milestone: 0.9.11.0 → 0.9.12.0
status: New → Triaged
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.