зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1445471 - Recognize invalid HANDLEs in plugin brokering. r=jimm
When InternetOpenA, or some other brokered function that returns handles, fails, we should not return a valid HANDLE id. We return an id of 0 instead.
This commit is contained in:
Родитель
5383105dd9
Коммит
3b52a7becc
|
@ -638,6 +638,12 @@ inline void EndpointHandler<SERVER>::Copy(uint64_t& aDest, const PSecHandle& aSr
|
|||
template<>
|
||||
inline void EndpointHandler<SERVER>::Copy(uint64_t& aDest, void* const & aSrc)
|
||||
{
|
||||
// If the HANDLE/HINSTANCE was an error then don't store it.
|
||||
if (!aSrc) {
|
||||
aDest = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
static uint64_t sNextVal = 1;
|
||||
// Fetch val by reference to update the value in the map
|
||||
uint64_t& val = sPtrToIdMap[aSrc];
|
||||
|
|
Загрузка…
Ссылка в новой задаче