Closed Bug 1651419 Opened 4 years ago Closed 4 years ago

nsDOMWindowUtils::CompareCanvases() checks img1, img2 for NULL after dereferencing them

Categories

(Core :: DOM: Core & HTML, defect)

defect

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox-esr78 --- wontfix
firefox80 --- wontfix
firefox85 --- wontfix
firefox86 --- wontfix
firefox87 --- fixed

People

(Reporter: izbyshev, Assigned: izbyshev)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: good-first-bug, regression)

Attachments

(1 file)

img1 and img2 are dereferenced at https://searchfox.org/mozilla-central/rev/85ae3b91/dom/base/nsDOMWindowUtils.cpp#1301, but are checked for NULL only after that. Shouldn't the checks be moved up?

This line is added in bug 1428946.
Add author and reviewer to comment this.

Severity: -- → S3
Flags: needinfo?(bas)
Flags: needinfo?(aosmond)

Correct :)

Flags: needinfo?(bas)

(In reply to Bas Schouten (:bas.schouten) from comment #3)

Correct :)

It looks like a good first bug for volunteer.

Hi Alexey,
it will be nice if you can contribute this fix. :)

https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/How_to_Submit_a_Patch

Flags: needinfo?(aosmond)
Keywords: good-first-bug

The dereference before the NULL check was introduced in bug 1162357. I've added the author to CC (though he is on leave now) and submitted a patch.

Regressed by: 1162357
Has Regression Range: --- → yes
Assignee: nobody → izbyshev

This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit auto_nag documentation.

Assignee: izbyshev → nobody
Status: UNCONFIRMED → NEW
Ever confirmed: true

Bas, is this ready to land?

Flags: needinfo?(bas)
Assignee: nobody → izbyshev
Status: NEW → ASSIGNED
Flags: needinfo?(bas)
Pushed by ntim.bugs@gmail.com: https://hg.mozilla.org/integration/autoland/rev/52e0bdf9460f Check `img1/img2` for NULL before dereferencing them in nsDOMWindowUtils::CompareCanvases(). r=bas,alchen
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: