mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 04:38:02 +00:00
Bug 1484910 - Use the CheckedInt API correctly; r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D21235 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
be4b24fd5d
commit
34c7c8f3d5
@ -1037,7 +1037,8 @@ class WidgetQueryContentEvent : public WidgetGUIEvent {
|
||||
return true;
|
||||
}
|
||||
// Otherwise, we don't allow too large offset.
|
||||
CheckedInt<uint32_t> absOffset = mOffset + aInsertionPointOffset;
|
||||
CheckedInt<uint32_t> absOffset =
|
||||
CheckedInt<uint32_t>(mOffset) + aInsertionPointOffset;
|
||||
if (NS_WARN_IF(!absOffset.isValid())) {
|
||||
mOffset = UINT32_MAX;
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user