bug 1549249 - build bustage follow-up r=mt,dveditz a=tomprince
authorDana Keeler <dkeeler@mozilla.com>
Tue, 07 May 2019 00:16:00 +0000
changeset 534724 ab7db57ad2ac2ebb1818346220f2045968b49415
parent 534723 e9a1fd460a24faaf398fc4bc3cabb31bb80b85e2
child 534725 4b84f663a807b7fb7429691f254b566e314e0bfe
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmt, dveditz, tomprince
bugs1549249
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1549249 - build bustage follow-up r=mt,dveditz a=tomprince SECItem uses an unsigned int to indicate its length. We need to cast a size_t down to the appropriate size. This is safe because what we're casting will always fit in an unsigned int on the platforms we're using (it's just the size of the intermediate certificate we added). Differential Revision: https://phabricator.services.mozilla.com/D30144
security/apps/AppTrustDomain.cpp
--- a/security/apps/AppTrustDomain.cpp
+++ b/security/apps/AppTrustDomain.cpp
@@ -129,17 +129,18 @@ nsresult AppTrustDomain::SetTrustedRoot(
   // If we're verifying add-ons signed by our production root, we want to make
   // sure a valid intermediate certificate is available for path building.
   // Merely holding this alive in memory makes it available for NSS to find in
   // AppTrustDomain::FindIssuer.
   if (trustedRoot == nsIX509CertDB::AddonsPublicRoot) {
     SECItem intermediateDER = {
         siBuffer,
         const_cast<uint8_t*>(addonsPublicIntermediate),
-        mozilla::ArrayLength(addonsPublicIntermediate),
+        static_cast<unsigned int>(
+            mozilla::ArrayLength(addonsPublicIntermediate)),
     };
     mAddonsIntermediate.reset(CERT_NewTempCertificate(
         CERT_GetDefaultCertDB(), &intermediateDER, nullptr, false, true));
     if (!mAddonsIntermediate) {
       return mozilla::psm::GetXPCOMFromNSSError(PR_GetError());
     }
   }