diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-11 14:15:49 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-11 14:15:49 +0100 |
commit | 823b9a4120813274849e68443ec43249b97add3e (patch) | |
tree | 0845f6a6ce06db041530948c5cbd4c347ba12866 /security/manager/ssl/TransportSecurityInfo.cpp | |
parent | 319d485e234dff3f59ac2e98ccf4c32a1aa43642 (diff) | |
parent | cffb44547ae7997e5eaf71c644bd626eeb3bba00 (diff) | |
download | UXP-823b9a4120813274849e68443ec43249b97add3e.tar UXP-823b9a4120813274849e68443ec43249b97add3e.tar.gz UXP-823b9a4120813274849e68443ec43249b97add3e.tar.lz UXP-823b9a4120813274849e68443ec43249b97add3e.tar.xz UXP-823b9a4120813274849e68443ec43249b97add3e.zip |
Merge branch 'release' into Pale_Moon-release
Diffstat (limited to 'security/manager/ssl/TransportSecurityInfo.cpp')
-rw-r--r-- | security/manager/ssl/TransportSecurityInfo.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/security/manager/ssl/TransportSecurityInfo.cpp b/security/manager/ssl/TransportSecurityInfo.cpp index 3c7023302..3f4bf4a90 100644 --- a/security/manager/ssl/TransportSecurityInfo.cpp +++ b/security/manager/ssl/TransportSecurityInfo.cpp @@ -8,6 +8,7 @@ #include "PSMRunnable.h" #include "mozilla/Casting.h" +#include "mozilla/net/DNS.h" #include "nsComponentManagerUtils.h" #include "nsIArray.h" #include "nsICertOverrideService.h" @@ -681,8 +682,10 @@ GetSubjectAltNames(CERTCertificate* nssCert, nsString& allNames) case certIPAddress: { - char buf[INET6_ADDRSTRLEN]; + // According to DNS.h, this includes space for the null-terminator + char buf[net::kNetAddrMaxCStrBufSize] = {0}; PRNetAddr addr; + memset(&addr, 0, sizeof(addr)); if (current->name.other.len == 4) { addr.inet.family = PR_AF_INET; memcpy(&addr.inet.ip, current->name.other.data, current->name.other.len); |