forked from wolfSSL/wolfssl
wolfcrypt/src/asn.c wc_BuildEccKeyDer(): fix for clang-analyzer-deadcode.DeadStores.
This commit is contained in:
@@ -29351,6 +29351,7 @@ static int wc_BuildEccKeyDer(ecc_key* key, byte* output, word32 *inLen,
|
|||||||
SetASNItem_NoOutNode(dataASN, eccKeyASN, ECCKEYASN_IDX_PARAMS,
|
SetASNItem_NoOutNode(dataASN, eccKeyASN, ECCKEYASN_IDX_PARAMS,
|
||||||
eccKeyASN_Length);
|
eccKeyASN_Length);
|
||||||
}
|
}
|
||||||
|
if (ret == 0) {
|
||||||
if (pubIn) {
|
if (pubIn) {
|
||||||
/* Leave space for public key. */
|
/* Leave space for public key. */
|
||||||
SetASN_Buffer(&dataASN[ECCKEYASN_IDX_PUBKEY_VAL], NULL, pubSz);
|
SetASN_Buffer(&dataASN[ECCKEYASN_IDX_PUBKEY_VAL], NULL, pubSz);
|
||||||
@@ -29363,6 +29364,7 @@ static int wc_BuildEccKeyDer(ecc_key* key, byte* output, word32 *inLen,
|
|||||||
/* Calculate size of the private key encoding. */
|
/* Calculate size of the private key encoding. */
|
||||||
ret = SizeASN_Items(eccKeyASN, dataASN, eccKeyASN_Length, &sz);
|
ret = SizeASN_Items(eccKeyASN, dataASN, eccKeyASN_Length, &sz);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* Return the size if no buffer. */
|
/* Return the size if no buffer. */
|
||||||
if ((ret == 0) && (output == NULL)) {
|
if ((ret == 0) && (output == NULL)) {
|
||||||
*inLen = sz;
|
*inLen = sz;
|
||||||
|
Reference in New Issue
Block a user