mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 499203 null deref in nsprotocolproxyservice::getprotocolinfo with null nsiuri r=biesi
This commit is contained in:
parent
a61f718b7d
commit
c101492d45
@ -819,6 +819,8 @@ NS_IMETHODIMP
|
||||
nsProtocolProxyService::Resolve(nsIURI *uri, uint32_t flags,
|
||||
nsIProxyInfo **result)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(uri);
|
||||
|
||||
nsProtocolInfo info;
|
||||
nsresult rv = GetProtocolInfo(uri, &info);
|
||||
if (NS_FAILED(rv))
|
||||
@ -864,6 +866,9 @@ nsProtocolProxyService::AsyncResolve(nsIURI *uri, uint32_t flags,
|
||||
nsIProtocolProxyCallback *callback,
|
||||
nsICancelable **result)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(uri);
|
||||
NS_ENSURE_ARG_POINTER(callback);
|
||||
|
||||
nsRefPtr<nsAsyncResolveRequest> ctx =
|
||||
new nsAsyncResolveRequest(this, uri, flags, callback);
|
||||
if (!ctx)
|
||||
@ -1173,6 +1178,9 @@ loser:
|
||||
nsresult
|
||||
nsProtocolProxyService::GetProtocolInfo(nsIURI *uri, nsProtocolInfo *info)
|
||||
{
|
||||
NS_PRECONDITION(uri, "URI is null");
|
||||
NS_PRECONDITION(info, "info is null");
|
||||
|
||||
nsresult rv;
|
||||
|
||||
rv = uri->GetScheme(info->scheme);
|
||||
|
Loading…
Reference in New Issue
Block a user