diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-09 21:39:28 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-11 13:45:47 +0100 |
commit | d0256e1afc1ba721e98f377d8925e7b7282f5a99 (patch) | |
tree | b64c13a9f169493e4d9e7f29ec15d2b5689dc267 /security/manager/ssl/nsNSSCertHelper.cpp | |
parent | 19939f17f015f2155894f8e4c5e4ec9b8acc3ddc (diff) | |
download | UXP-d0256e1afc1ba721e98f377d8925e7b7282f5a99.tar UXP-d0256e1afc1ba721e98f377d8925e7b7282f5a99.tar.gz UXP-d0256e1afc1ba721e98f377d8925e7b7282f5a99.tar.lz UXP-d0256e1afc1ba721e98f377d8925e7b7282f5a99.tar.xz UXP-d0256e1afc1ba721e98f377d8925e7b7282f5a99.zip |
Be more consistent about decoding IP addresses in PSM.
Diffstat (limited to 'security/manager/ssl/nsNSSCertHelper.cpp')
-rw-r--r-- | security/manager/ssl/nsNSSCertHelper.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/security/manager/ssl/nsNSSCertHelper.cpp b/security/manager/ssl/nsNSSCertHelper.cpp index 64c87ad2f..efcb8747a 100644 --- a/security/manager/ssl/nsNSSCertHelper.cpp +++ b/security/manager/ssl/nsNSSCertHelper.cpp @@ -11,6 +11,7 @@ #include "mozilla/NotNull.h" #include "mozilla/Sprintf.h" #include "mozilla/UniquePtr.h" +#include "mozilla/net/DNS.h" #include "nsCOMPtr.h" #include "nsComponentManagerUtils.h" #include "nsDateTimeFormatCID.h" @@ -1006,8 +1007,9 @@ ProcessGeneralName(const UniquePLArenaPool& arena, CERTGeneralName* current, break; case certIPAddress: { - char buf[INET6_ADDRSTRLEN]; PRStatus status = PR_FAILURE; + // According to DNS.h, this includes space for the null-terminator + char buf[net::kNetAddrMaxCStrBufSize] = {0}; PRNetAddr addr; memset(&addr, 0, sizeof(addr)); nssComponent->GetPIPNSSBundleString("CertDumpIPAddress", key); |