diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-10-04 22:24:52 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-10-04 22:24:52 +0200 |
commit | 95379e33779a5802dc7d5dbb6dd3919cc4607bb9 (patch) | |
tree | 29ea871162c5f8d378a839b9fb204ecb095185aa /security/manager/ssl/TransportSecurityInfo.cpp | |
parent | ca7ecd37c94e268972697a37eec4e46771c6e6f2 (diff) | |
download | UXP-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.cpp | 7 |
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)); |