Closed
Bug 1230913
Opened 10 years ago
Closed 10 years ago
[Static Analysis][Dereference before null check] In function TextureClient::CreateWithBufferSize from TextureClient.cpp
Categories
(Core :: Graphics: Layers, defect)
Core
Graphics: Layers
Tracking
()
RESOLVED
FIXED
mozilla46
People
(Reporter: andi, Assigned: andi)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: CID 1338036)
Attachments
(1 file, 1 obsolete file)
|
1.07 KB,
patch
|
Details | Diff | Splinter Review |
The Static Analysis tool Coverity added that pointer aAllocator is dereferenced before null check, that could resul to a null poinder dereference.
| Assignee | ||
Updated•10 years ago
|
Summary: [Static Analysis][Dereference before null check] In function 46TextureClient::CreateWithBufferSize from TextureClient.cpp → [Static Analysis][Dereference before null check] In function TextureClient::CreateWithBufferSize from TextureClient.cpp
| Assignee | ||
Comment 1•10 years ago
|
||
Hello Robert,
Can you please take a look other this patch?
THX
Attachment #8696444 -
Flags: review?(roc)
Comment on attachment 8696444 [details] [diff] [review]
Bug 1230913.diff
Review of attachment 8696444 [details] [diff] [review]:
-----------------------------------------------------------------
r+ with that change
::: gfx/layers/client/TextureClient.cpp
@@ +844,5 @@
> size_t aSize,
> TextureFlags aTextureFlags)
> {
> + // also test the validity of aAllocator
> + MOZ_ASSERT(aAllocator ? aAllocator->IPCOpen() : false);
You should never use the ?: operator with a boolean constant. Here you can write
MOZ_ASSERT(aAllocator && aAllocator->IPCOpen());
Attachment #8696444 -
Flags: review?(roc) → review+
| Assignee | ||
Comment 3•10 years ago
|
||
Thx for seeing that Robert
Attachment #8696444 -
Attachment is obsolete: true
| Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Keywords: checkin-needed
Comment 5•10 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox46:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in
before you can comment on or make changes to this bug.
Description
•