mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 11:17:29 +02:00
Merge pull request #879 from dgarske/fix_builderrors2
Fix for scan-build issues with possible use of null’s
This commit is contained in:
@ -538,7 +538,6 @@ static void Usage(void)
|
|||||||
#endif
|
#endif
|
||||||
printf("-B <num> Benchmark throughput using <num> bytes and print stats\n");
|
printf("-B <num> Benchmark throughput using <num> bytes and print stats\n");
|
||||||
printf("-s Use pre Shared keys\n");
|
printf("-s Use pre Shared keys\n");
|
||||||
printf("-t Track wolfSSL memory use\n");
|
|
||||||
printf("-d Disable peer checks\n");
|
printf("-d Disable peer checks\n");
|
||||||
printf("-D Override Date Errors example\n");
|
printf("-D Override Date Errors example\n");
|
||||||
printf("-e List Every cipher suite available, \n");
|
printf("-e List Every cipher suite available, \n");
|
||||||
|
@ -6809,6 +6809,7 @@ static int DoCertificate(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
|||||||
if (args->certs == NULL) {
|
if (args->certs == NULL) {
|
||||||
ERROR_OUT(MEMORY_E, exit_dc);
|
ERROR_OUT(MEMORY_E, exit_dc);
|
||||||
}
|
}
|
||||||
|
XMEMSET(args->certs, 0, sizeof(buffer) * MAX_CHAIN_DEPTH);
|
||||||
|
|
||||||
if ((args->idx - args->begin) + OPAQUE24_LEN > size) {
|
if ((args->idx - args->begin) + OPAQUE24_LEN > size) {
|
||||||
ERROR_OUT(BUFFER_ERROR, exit_dc);
|
ERROR_OUT(BUFFER_ERROR, exit_dc);
|
||||||
|
@ -60,7 +60,7 @@ WOLFSSL_API WOLFSSL_EVP_CIPHER_CTX *wolfSSL_EVP_CIPHER_CTX_new(void)
|
|||||||
WOLFSSL_EVP_CIPHER_CTX *ctx = (WOLFSSL_EVP_CIPHER_CTX*)XMALLOC(sizeof *ctx,
|
WOLFSSL_EVP_CIPHER_CTX *ctx = (WOLFSSL_EVP_CIPHER_CTX*)XMALLOC(sizeof *ctx,
|
||||||
NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
if (ctx){
|
if (ctx){
|
||||||
WOLFSSL_ENTER("wolfSSL_EVP_CIPHER_CTX_new");
|
WOLFSSL_ENTER("wolfSSL_EVP_CIPHER_CTX_new");
|
||||||
wolfSSL_EVP_CIPHER_CTX_init(ctx);
|
wolfSSL_EVP_CIPHER_CTX_init(ctx);
|
||||||
}
|
}
|
||||||
return ctx;
|
return ctx;
|
||||||
@ -327,7 +327,7 @@ WOLFSSL_API int wolfSSL_EVP_CipherFinal(WOLFSSL_EVP_CIPHER_CTX *ctx,
|
|||||||
unsigned char *out, int *outl)
|
unsigned char *out, int *outl)
|
||||||
{
|
{
|
||||||
int fl ;
|
int fl ;
|
||||||
if (ctx == NULL) return BAD_FUNC_ARG;
|
if (ctx == NULL || out == NULL) return BAD_FUNC_ARG;
|
||||||
WOLFSSL_ENTER("wolfSSL_EVP_CipherFinal");
|
WOLFSSL_ENTER("wolfSSL_EVP_CipherFinal");
|
||||||
if (ctx->flags & WOLFSSL_EVP_CIPH_NO_PADDING) {
|
if (ctx->flags & WOLFSSL_EVP_CIPH_NO_PADDING) {
|
||||||
*outl = 0;
|
*outl = 0;
|
||||||
|
Reference in New Issue
Block a user