Closed Bug 1230106 Opened 9 years ago Closed 9 years ago

[Static Analysis][Dereference of null pointer] Function DOMSVGPointList::InsertItemBefore from DOMSVGPointList.cpp can cause a null pointer dereference

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: andi, Assigned: andi)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: CID 1338374)

Attachments

(1 file)

The Static Analysis tool Coverity added that pointer animVal can cause a null pointer dereference on line 324.
In this patch i've added a MOZZ_ASSERT, in order to test the pointer validity.
Attached patch Bug 1230106.diffSplinter Review
Hello Jonathan,

Could you please take a look other this patch. it's just a simple assert on a pointer to signal a potential null pointer dereference.

THX
Attachment #8695230 - Flags: review?(jwatt)
Whiteboard: CID 1338374
Comment on attachment 8695230 [details] [diff] [review]
Bug 1230106.diff

stealing as this is my code.

MOZ_ASSERT(animVal, "AnimListMirrorsBaseList() promised a non-null animVal");

would be better but the text doesn't matter that much.
Attachment #8695230 - Flags: review?(jwatt) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/3bdd64ed0fd5
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: