summaryrefslogtreecommitdiffstats
path: root/security/manager/ssl/TransportSecurityInfo.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-10-04 22:24:52 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-10-04 22:24:52 +0200
commit95379e33779a5802dc7d5dbb6dd3919cc4607bb9 (patch)
tree29ea871162c5f8d378a839b9fb204ecb095185aa /security/manager/ssl/TransportSecurityInfo.cpp
parentca7ecd37c94e268972697a37eec4e46771c6e6f2 (diff)
downloadUXP-95379e33779a5802dc7d5dbb6dd3919cc4607bb9.tar
UXP-95379e33779a5802dc7d5dbb6dd3919cc4607bb9.tar.gz
UXP-95379e33779a5802dc7d5dbb6dd3919cc4607bb9.tar.lz
UXP-95379e33779a5802dc7d5dbb6dd3919cc4607bb9.tar.xz
UXP-95379e33779a5802dc7d5dbb6dd3919cc4607bb9.zip
Ensure we got an nsISSLStatus when deserializing in TransportSecurityInfo.
Diffstat (limited to 'security/manager/ssl/TransportSecurityInfo.cpp')
-rw-r--r--security/manager/ssl/TransportSecurityInfo.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/security/manager/ssl/TransportSecurityInfo.cpp b/security/manager/ssl/TransportSecurityInfo.cpp
index 0e2238ad0..3c7023302 100644
--- a/security/manager/ssl/TransportSecurityInfo.cpp
+++ b/security/manager/ssl/TransportSecurityInfo.cpp
@@ -429,7 +429,12 @@ TransportSecurityInfo::Read(nsIObjectInputStream* stream)
if (NS_FAILED(rv)) {
return rv;
}
- mSSLStatus = BitwiseCast<nsSSLStatus*, nsISupports*>(supports.get());
+ nsCOMPtr<nsISSLStatus> castGuard(do_QueryInterface(supports));
+ if (castGuard) {
+ mSSLStatus = BitwiseCast<nsSSLStatus*, nsISSLStatus*>(castGuard.get());
+ } else {
+ mSSLStatus = nullptr;
+ }
nsCOMPtr<nsISupports> failedCertChainSupports;
rv = NS_ReadOptionalObject(stream, true, getter_AddRefs(failedCertChainSupports));