Closed
Bug 290180
Opened 20 years ago
Closed 20 years ago
Coverity errors found in toolkit/
Categories
(Toolkit Graveyard :: Build Config, defect)
Toolkit Graveyard
Build Config
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.8beta2
People
(Reporter: benjamin, Assigned: benjamin)
References
(Blocks 1 open bug)
Details
(Keywords: coverity)
Attachments
(1 file)
|
16.15 KB,
patch
|
darin.moz
:
first-review+
asa
:
approval1.8b2+
|
Details | Diff | Splinter Review |
Minor cleanup from errors found by Coverity static-analysis tool in the toolkit/* directory.
| Assignee | ||
Comment 1•20 years ago
|
||
These are mainly edge-case OOM errors, but the GetScreenOrigin function is broken by design and may well be the source of memory leaks, and might actually be worth taking on the 1.0.x branch... let me know what you think about that.
Attachment #180589 -
Flags: first-review?(darin)
Comment 2•20 years ago
|
||
Comment on attachment 180589 [details] [diff] [review] Coverity-detected errors in toolkit/*, rev. 1 >Index: toolkit/components/history/src/nsGlobalHistory.cpp >+ if (tokenStruct) >+ aResult.AppendElement((void *)tokenStruct); >+ > // reset our state > tokenName = tokenValue = nsnull; > tokenNameLength = tokenValueLength = 0; >Index: toolkit/components/passwordmgr/base/nsPasswordManager.cpp >+ PRUnichar* data = ToNewUnicode(userValue); >+ if (data) >+ result->mArray.AppendElement(data); > } These changes are fine, but maybe it would be better to early return with some error to indicate out of memory? Or, if that is just far from convenient, then no problem. r=darin
Attachment #180589 -
Flags: first-review?(darin) → first-review+
| Assignee | ||
Comment 3•20 years ago
|
||
Comment on attachment 180589 [details] [diff] [review] Coverity-detected errors in toolkit/*, rev. 1 Yeah, there isn't a good way to report errors that does not skip other logic. Swallowing them looked like the better choice.
Attachment #180589 -
Flags: approval1.8b2?
Comment 4•20 years ago
|
||
Comment on attachment 180589 [details] [diff] [review] Coverity-detected errors in toolkit/*, rev. 1 a=asa
Attachment #180589 -
Flags: approval1.8b2? → approval1.8b2+
| Assignee | ||
Comment 5•20 years ago
|
||
Fixed on trunk.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.8beta2
Updated•6 years ago
|
Blocks: coverity-analysis
Updated•6 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•