Closed Bug 1230912 Opened 4 years ago Closed 4 years ago

[Static Analysis][Dereference before null check] In function TextureClient::CreateForRawBufferAccess from TextureClient.cpp

Categories

(Core :: Graphics: Layers, defect)

defect
Not set

Tracking

()

RESOLVED DUPLICATE of bug 1230911
Tracking Status
firefox45 --- affected

People

(Reporter: andi, Assigned: andi)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: CID 1338037)

Attachments

(1 file, 3 obsolete files)

The Static Analysis tool Coverity added that pointer aAllocator is dereferenced before null check, that could resul to a null poinder dereference.
Attached patch Bug 1230912.diff (obsolete) — Splinter Review
Hello Robert,

Can you please take a look other this patch?

THX
Attachment #8696443 - Flags: review?(roc)
No longer depends on: 1230911
Comment on attachment 8696443 [details] [diff] [review]
Bug 1230912.diff

Review of attachment 8696443 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/client/TextureClient.cpp
@@ +786,5 @@
>                                          TextureFlags aTextureFlags,
>                                          TextureAllocationFlags aAllocFlags)
>  {
> +  // also test the validity of aAllocator
> +  MOZ_ASSERT(aAllocator ? aAllocator->IPCOpen() : false);

Same as my previous comment:
MOZ_ASSERT(aAllocator && aAllocator->IPCOpen());
Attachment #8696443 - Flags: review?(roc) → review+
Attached patch Bug 1230912.diff (obsolete) — Splinter Review
Attachment #8696443 - Attachment is obsolete: true
Keywords: checkin-needed
has problems to apply:

Hunk #1 FAILED at 780
1 out of 1 hunks FAILED -- saving rejects to file gfx/layers/client/TextureClient.cpp.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working directory
errors during apply, please fix and qrefresh Bug_1230912.diff
Flags: needinfo?(bogdan.postelnicu)
Attached patch Bug 1230912.diff (obsolete) — Splinter Review
Attachment #8697923 - Attachment is obsolete: true
Flags: needinfo?(bogdan.postelnicu)
Attached patch Bug 1230912.diffSplinter Review
Attachment #8722904 - Attachment is obsolete: true
Already pushed in version 285175.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1230911
You need to log in before you can comment on or make changes to this bug.