Bug 982778: Initialize parameters of output value of der::AlgorithmIdentifier, r=keeler
authorBrian Smith <brian@briansmith.org>
Thu, 13 Mar 2014 21:26:03 -0700
changeset 175665 08032b8280c60a681a0c2c57a65c259ee76b3c44
parent 175664 f2c60695a6e94d19ba35bb15598af9d61c79a1c1
child 175666 8d521eaf9b6584c8e18dd1ffd5fcbece0b28b9ea
push id26496
push userkwierso@gmail.com
push dateFri, 28 Mar 2014 02:28:34 +0000
treeherdermozilla-central@3c09159e01da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskeeler
bugs982778
milestone31.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 982778: Initialize parameters of output value of der::AlgorithmIdentifier, r=keeler
security/pkix/lib/pkixder.h
--- a/security/pkix/lib/pkixder.h
+++ b/security/pkix/lib/pkixder.h
@@ -470,16 +470,18 @@ OID(Input& input, const uint8_t (&expect
 //         algorithm               OBJECT IDENTIFIER,
 //         parameters              ANY DEFINED BY algorithm OPTIONAL  }
 inline Result
 AlgorithmIdentifier(Input& input, SECAlgorithmID& algorithmID)
 {
   if (Skip(input, OIDTag, algorithmID.algorithm) != Success) {
     return Failure;
   }
+  algorithmID.parameters.data = nullptr;
+  algorithmID.parameters.len = 0;
   if (input.AtEnd()) {
     return Success;
   }
   return Null(input);
 }
 
 inline Result
 CertificateSerialNumber(Input& input, /*out*/ SECItem& serialNumber)