Skip to content

Commit

Permalink
Bug 1277228 - scan-build on ckfw, crmf, cryptohi, nss, and dev, r=tta…
Browse files Browse the repository at this point in the history
…ubert

Differential Revision: https://nss-dev.phacility.com/D119

--HG--
extra : rebase_source : 5f87224c8c746f8ea7a2d2c3f1c08d5b27318bff
extra : amend_source : 4effb4bcbf56e5670581a0eb221160d7a4b3a585
  • Loading branch information
franziskuskiefer committed Oct 26, 2016
1 parent 2e3189f commit 62ad08b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
7 changes: 6 additions & 1 deletion automation/taskcluster/scripts/run_scan_build.sh
Expand Up @@ -23,8 +23,13 @@ declare -A scan=( \
[lib/base]=0 \
[lib/certdb]=0 \
[lib/certhigh]=0 \
[lib/ssl]=0 \
[lib/ckfw]=0 \
[lib/crmf]=0 \
[lib/cryptohi]=0 \
[lib/dev]=0 \
[lib/freebl]=0 \
[lib/nss]=0 \
[lib/ssl]=0 \
[lib/util]=0 \
)

Expand Down
2 changes: 1 addition & 1 deletion lib/ckfw/mechanism.c
Expand Up @@ -99,7 +99,7 @@ nssCKFWMechanism_Destroy(
{
/* destroy any fw resources held by nssCKFWMechanism (currently none) */

if (!fwMechanism->mdMechanism->Destroy) {
if (fwMechanism->mdMechanism->Destroy) {
/* destroys it's parent as well */
fwMechanism->mdMechanism->Destroy(
fwMechanism->mdMechanism,
Expand Down
4 changes: 3 additions & 1 deletion lib/crmf/cmmfchal.c
Expand Up @@ -34,7 +34,9 @@ cmmf_create_witness_and_challenge(PLArenaPool *poolp,

encodedRandNum = SEC_ASN1EncodeInteger(poolp, &challenge->randomNumber,
inRandom);
encodedRandNum = &challenge->randomNumber;
if (!encodedRandNum) {
goto loser;
}
randHash = PORT_ArenaNewArray(poolp, unsigned char, SHA1_LENGTH);
senderHash = PORT_ArenaNewArray(poolp, unsigned char, SHA1_LENGTH);
if (randHash == NULL) {
Expand Down
3 changes: 0 additions & 3 deletions lib/cryptohi/seckey.c
Expand Up @@ -315,8 +315,6 @@ seckey_UpdateCertPQGChain(CERTCertificate *subjectCert, int count)
CERTSubjectPublicKeyInfo *issuerSpki = NULL;
CERTCertificate *issuerCert = NULL;

rv = SECSuccess;

/* increment cert chain length counter*/
count++;

Expand Down Expand Up @@ -649,7 +647,6 @@ seckey_ExtractPublicKey(const CERTSubjectPublicKeyInfo *spki)

default:
PORT_SetError(SEC_ERROR_UNSUPPORTED_KEYALG);
rv = SECFailure;
break;
}

Expand Down
1 change: 0 additions & 1 deletion lib/nss/nssinit.c
Expand Up @@ -98,7 +98,6 @@ nss_makeFlags(PRBool readOnly, PRBool noCertDB,
if (!first)
PORT_Strcat(flags, ",");
PORT_Strcat(flags, "optimizeSpace");
first = PR_FALSE;
}
return flags;
}
Expand Down

0 comments on commit 62ad08b

Please sign in to comment.