mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 695965: Fix use of uninitialized memory in nsUrlClassifierDBService::CheckClean. r=bent
This commit is contained in:
parent
cc28dc3790
commit
19088b7535
@ -1430,7 +1430,7 @@ nsUrlClassifierDBService::CheckClean(const nsACString &spec,
|
||||
rv = KeyedHash(fragkey, hostprefix, prefixkey, &codedkey);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
bool found;
|
||||
bool found = false;
|
||||
bool ready = false; /* opportunistic probe */
|
||||
rv = mPrefixSet->Probe(codedkey, prefixkey, &ready, &found);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
@ -278,6 +278,8 @@ nsUrlClassifierPrefixSet::Probe(PRUint32 aPrefix, PRUint32 aKey,
|
||||
{
|
||||
MutexAutoLock lock(mPrefixSetLock);
|
||||
|
||||
*aFound = false;
|
||||
|
||||
// We might have raced here with a LoadPrefixSet call,
|
||||
// loading a saved PrefixSet with another key than the one used to probe us.
|
||||
// This must occur exactly between the GetKey call and the Probe call.
|
||||
|
Loading…
Reference in New Issue
Block a user