Skip to content

Commit

Permalink
Bug 1216501 - [CID 1327954][CID 1327953][CID 1327952][CID 1327951] Us…
Browse files Browse the repository at this point in the history
…ing uninitialized value secitem.type when calling SECITEM_CopyItem_Util - copying secitem.type only if present, r=mt
  • Loading branch information
franziskuskiefer committed Oct 21, 2015
1 parent 7fdfd3c commit 992f951
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/cryptohi/secsign.c
Expand Up @@ -413,6 +413,7 @@ SGN_Digest(SECKEYPrivateKey *privKey,
}
result->len = modulusLen;
result->data = (unsigned char*) PORT_Alloc(modulusLen);
result->type = siBuffer;

if (result->data == NULL) {
rv = SECFailure;
Expand Down
1 change: 1 addition & 0 deletions lib/pk11wrap/pk11akey.c
Expand Up @@ -1515,6 +1515,7 @@ PK11_MakeKEAPubKey(unsigned char *keyData,int length)

pkData.data = keyData;
pkData.len = length;
pkData.type = siBuffer;

arena = PORT_NewArena (DER_DEFAULT_CHUNKSIZE);
if (arena == NULL)
Expand Down
1 change: 1 addition & 0 deletions lib/pkcs12/p12d.c
Expand Up @@ -1983,6 +1983,7 @@ gatherNicknames(CERTCertificate *cert, void *arg)

tempNick.data = (unsigned char *)cert->nickname;
tempNick.len = PORT_Strlen(cert->nickname) + 1;
tempNick.type = siAsciiString;

/* do we already have the nickname in the list? */
if(nickArg->nNicks > 0) {
Expand Down
1 change: 1 addition & 0 deletions lib/softoken/pkcs11c.c
Expand Up @@ -3698,6 +3698,7 @@ nsc_SetupHMACKeyGen(CK_MECHANISM_PTR pMechanism, NSSPKCS5PBEParameter **pbe)

salt.data = (unsigned char *)pbe_params->pSalt;
salt.len = (unsigned int)pbe_params->ulSaltLen;
salt.type = siBuffer;
rv = SECITEM_CopyItem(arena,&params->salt,&salt);
if (rv != SECSuccess) {
PORT_FreeArena(arena,PR_TRUE);
Expand Down

0 comments on commit 992f951

Please sign in to comment.