Closed Bug 1540273 Opened 5 years ago Closed 5 years ago

fix undefined shift behavior in nsXPCWrappedJSClass

Categories

(Core :: XPConnect, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

Details

Attachments

(1 file)

No description provided.

Left shifts exhibit undefined behavior if the sign bit changes, which
would happen in this code for indices that are 31 mod 32. Fix this by
always making sure the shifted value is an unsigned integer.

Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/468f0646a149
fix undefined behavior in nsXPCWrappedJSClass; r=mccr8
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: