From c354b240f2297ae25eeae8dfa760ec586e0e70d1 Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Wed, 30 Oct 2019 14:48:21 +1000 Subject: [PATCH] Fixes for errors using cppcheck --- IDE/VS-AZURE-SPHERE/client/client.c | 3 ++- wolfcrypt/src/pkcs7.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/IDE/VS-AZURE-SPHERE/client/client.c b/IDE/VS-AZURE-SPHERE/client/client.c index 69b11da53..2861ada8c 100644 --- a/IDE/VS-AZURE-SPHERE/client/client.c +++ b/IDE/VS-AZURE-SPHERE/client/client.c @@ -82,7 +82,8 @@ int main(int argc, char** argv) /* Load client certificates into WOLFSSL_CTX */ ret = wolfSSL_CTX_load_verify_buffer(ctx, CERT, SIZEOF_CERT, WOLFSSL_FILETYPE_ASN1); if (ret != SSL_SUCCESS) { - fprintf(stderr, "ERROR: failed to load %s, please check the buffer.\n"); + fprintf(stderr, "ERROR: failed to load client certificate, " + "please check the buffer.\n"); util_Cleanup(sockfd,ctx,ssl); return -1; } diff --git a/wolfcrypt/src/pkcs7.c b/wolfcrypt/src/pkcs7.c index 96c4e7048..e978dcf72 100644 --- a/wolfcrypt/src/pkcs7.c +++ b/wolfcrypt/src/pkcs7.c @@ -12293,7 +12293,7 @@ int wc_PKCS7_DecodeCompressedData(PKCS7* pkcs7, byte* pkiMsg, word32 pkiMsgSz, } /* get ContentInfo content EXPLICIT SEQUENCE */ - if (GetASNTag(pkiMsg, &idx, &tag, pkiMsgSz < 0) + if (GetASNTag(pkiMsg, &idx, &tag, pkiMsgSz) < 0) return ASN_PARSE_E; if (tag != (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0))