Index: src/plugin/PluginWbPassThrough.cpp
===================================================================
--- a/src/plugin/PluginWbPassThrough.cpp
+++ b/src/plugin/PluginWbPassThrough.cpp
@@ -13,7 +13,7 @@
namespace
{
- std::string g_blockedByABPPage = ""
+ const std::string g_blockedByABPPage = ""
""
"
"
""
@@ -43,7 +43,7 @@
// only HTTP_QUERY_RAW_HEADERS_CRLF | HTTP_QUERY_FLAG_REQUEST_HEADERS does work.
ATL::CComPtr winInetHttpInfo;
HRESULT hr = internetProtocol->QueryInterface(&winInetHttpInfo);
- if (FAILED(hr))
+ if (FAILED(hr) || !winInetHttpInfo)
{
return "";
}
@@ -181,11 +181,7 @@
HRESULT WBPassthruSink::OnRead(void* pv, ULONG cb, ULONG* pcbRead)
{
- if (pv == nullptr)
- {
- return E_POINTER;
- }
- if (pcbRead == nullptr)
+ if (!pv || !pcbRead)
{
return E_POINTER;
}
@@ -278,6 +274,10 @@
STDMETHODIMP WBPassthruSink::BeginningTransaction(LPCWSTR szURL, LPCWSTR szHeaders, DWORD dwReserved, LPWSTR* pszAdditionalHeaders)
{
+ if (!szURL)
+ {
+ return E_POINTER;
+ }
std::wstring src = szURL;
DEBUG_GENERAL(ToCString(src));
@@ -390,14 +390,4 @@
{
WBPassthruSink* pSink = GetSink();
return pSink->OnRead(pv, cb, pcbRead);
-}
-
-STDMETHODIMP WBPassthru::LockRequest(/* [in] */ DWORD options)
-{
- return BaseClass::LockRequest(options);
-}
-
-STDMETHODIMP WBPassthru::UnlockRequest()
-{
- return BaseClass::UnlockRequest();
}
\ No newline at end of file
Index: src/plugin/PluginWbPassThrough.h
===================================================================
--- a/src/plugin/PluginWbPassThrough.h
+++ b/src/plugin/PluginWbPassThrough.h
@@ -78,8 +78,5 @@
//IInternetProtocol
STDMETHODIMP Read(/* [in, out] */ void *pv,/* [in] */ ULONG cb,/* [out] */ ULONG *pcbRead) override;
- STDMETHODIMP LockRequest(/* [in] */ DWORD dwOptions) override;
- STDMETHODIMP UnlockRequest() override;
-
bool m_shouldSupplyCustomContent;
};