mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
bug 1485515 - range check the network.trr.mode pref on read r=valentin
MozReview-Commit-ID: 8OdeXYQEzQJ Differential Revision: https://phabricator.services.mozilla.com/D4332 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
95343883e7
commit
ef67442423
@ -132,9 +132,13 @@ TRRService::ReadPrefs(const char *name)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread(), "wrong thread");
|
||||
if (!name || !strcmp(name, TRR_PREF("mode"))) {
|
||||
// 0 - off, 1 - parallel, 2 - TRR first, 3 - TRR only, 4 - shadow
|
||||
// 0 - off, 1 - parallel, 2 - TRR first, 3 - TRR only, 4 - shadow,
|
||||
// 5 - explicit off
|
||||
uint32_t tmp;
|
||||
if (NS_SUCCEEDED(Preferences::GetUint(TRR_PREF("mode"), &tmp))) {
|
||||
if (tmp > MODE_TRROFF) {
|
||||
tmp = MODE_TRROFF;
|
||||
}
|
||||
mMode = tmp;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user