Closed
Bug 1228314
Opened 9 years ago
Closed 8 years ago
[Static Analysis][INT Overflow] Function LookupBestMatch from SurfaceCache.cpp overflow on idealArea
Categories
(Core :: Graphics: ImageLib, defect)
Core
Graphics: ImageLib
Tracking
()
RESOLVED
FIXED
mozilla47
People
(Reporter: andi, Assigned: andi)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: CID 1340239)
Attachments
(2 files)
1.11 KB,
patch
|
Details | Diff | Splinter Review | |
58 bytes,
text/x-review-board-request
|
seth
:
review+
lizzard
:
approval-mozilla-aurora+
|
Details |
The Static Analysis tool Scan-Build added that variable idealArea will be assigned a potentially overflow value from int32.
Assignee | ||
Comment 1•9 years ago
|
||
Hello Seth could you please take a look other this issue and tell me if the patch seems ok?
Flags: needinfo?(seth)
Assignee | ||
Updated•9 years ago
|
Whiteboard: CID 1340239
Assignee | ||
Comment 2•9 years ago
|
||
A correction to my first post the error was generated by Coverity not Scan-build
Assignee | ||
Comment 3•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/31241/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/31241/
Attachment #8709049 -
Flags: review?(seth)
Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(seth)
Assignee | ||
Updated•8 years ago
|
Attachment #8709049 -
Flags: review?(netzen)
Comment 4•8 years ago
|
||
Comment on attachment 8709049 [details] MozReview Request: Bug 1228314 - added static_cast<int64> in order to avoid overflow. r?seth Sorry, I am not ideal for this review.
Attachment #8709049 -
Flags: review?(netzen)
Updated•8 years ago
|
Attachment #8709049 -
Flags: review?(seth) → review+
Comment 5•8 years ago
|
||
Comment on attachment 8709049 [details] MozReview Request: Bug 1228314 - added static_cast<int64> in order to avoid overflow. r?seth https://reviewboard.mozilla.org/r/31241/#review33283 Looks good! Thanks for identifying this issue. ::: image/SurfaceCache.cpp:330 (Diff revision 1) > - int64_t idealArea = idealKey.Size().width * idealKey.Size().height; > + int64_t idealArea = static_cast<int64_t>(idealKey.Size().width) * static_cast<int64_t>(idealKey.Size().height); This looks over 80 columns. Please insert a line break right after the '*'.
Assignee | ||
Comment 6•8 years ago
|
||
Comment on attachment 8709049 [details] MozReview Request: Bug 1228314 - added static_cast<int64> in order to avoid overflow. r?seth Review request updated; see interdiff: https://reviewboard.mozilla.org/r/31241/diff/1-2/
Comment 8•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9727cdebb2ee
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Comment 9•8 years ago
|
||
Comment on attachment 8709049 [details] MozReview Request: Bug 1228314 - added static_cast<int64> in order to avoid overflow. r?seth Need this for bug 1251091. Approval Request Comment [Feature/regressing bug #]: bug 1119774 added this code [User impact if declined]: needed for bug 1251091 [Describe test coverage new/current, TreeHerder]: none [Risks and why]: safe [String/UUID change made/needed]: none
Attachment #8709049 -
Flags: approval-mozilla-aurora?
Comment 11•8 years ago
|
||
Comment on attachment 8709049 [details] MozReview Request: Bug 1228314 - added static_cast<int64> in order to avoid overflow. r?seth We need this for the other related fixes for surface issues Please uplift to aurora.
Attachment #8709049 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 12•8 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-aurora/rev/c9563ef17e18
Updated•6 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•