Closed
Bug 1232596
Opened 8 years ago
Closed 8 years ago
[Static Analysis][Uninitialized scalar variable] In function CSSParserImpl::ParseDeclarationBlock from nsCSSParser.cpp
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla46
Tracking | Status | |
---|---|---|
firefox46 | --- | fixed |
People
(Reporter: andi, Assigned: andi)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: CID 1323118)
Attachments
(1 file)
869 bytes,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
The Static Analysis tool Coverity added that variable changed is not initialized: >> for (;;) { >> bool changed; >> if (!ParseDeclaration(declaration, aFlags, true, &changed, aContext)) Variable changed is passed by address to ParseDeclaration where it gets used without initialization below: >> aDeclaration->AddVariableDeclaration(varName, variableType, variableValue, status == ePriority_Important, >>false); >> } else { >> *aChanged |= mData.TransferFromBlock(mTempData, propID, >> PropertyEnabledState(), >> status == ePriority_Important, >> false, aMustCallValueAppended, >> aDeclaration, GetDocument()); Looking through code this behavior doesn't impact the application since the value stored in that variable it's not used later on, but i would still initialize it in order to silence Coverity.
Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8698346 -
Flags: review?(dbaron)
Attachment #8698346 -
Flags: review?(dbaron) → review+
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 3•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1f2dd0904614
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in
before you can comment on or make changes to this bug.
Description
•