Closed
Bug 991012
Opened 11 years ago
Closed 9 years ago
CID 1195278: Inequality comparison against NULL in jsopcode.cpp as found by Coverity
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: gkw, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, regression)
Coverity analysis of source code in js/src has found an inequality comparison against NULL issue, that probably happened in the past month.
*** CID 1195278: Inequality comparison against NULL (BAD_COMPARE)
/js/src/jsopcode.cpp: 1634 in <unnamed>::ExpressionDecompiler::quote(JSString *, unsigned int)()
1628 return sprinter.putString(str) >= 0;
1629 }
1630
1631 bool
1632 ExpressionDecompiler::quote(JSString *s, uint32_t quote)
1633 {
>>> CID 1195278: Inequality comparison against NULL (BAD_COMPARE)
>>> Comparing pointer "QuoteString(&this->sprinter, s, quote)" against NULL using anything besides == or != is likely to be incorrect.
1634 return QuoteString(&sprinter, s, quote) >= 0;
1635 }
1636
1637 JSAtom *
1638 ExpressionDecompiler::loadAtom(jsbytecode *pc)
1639 {
jorendorff, any thoughts on how to move forward here?
Flags: needinfo?(jorendorff)
Comment 1•11 years ago
|
||
Wow, nice find. coverity++
Reporter | ||
Updated•11 years ago
|
Summary: Inequality comparison against NULL in jsopcode.cpp as found by Coverity → CID 1195278: Inequality comparison against NULL in jsopcode.cpp as found by Coverity
Comment 2•9 years ago
|
||
Fixed by sunfish in commit fab2921f6306.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(jorendorff)
Resolution: --- → FIXED
Updated•6 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•