mirror of https://github.com/wolfSSL/wolfssl.git
Fixed a couple initialization issues scan-build indicated.
parent
093a31ed49
commit
e7af2d2ba9
|
@ -24457,6 +24457,10 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
|||
ERROR_OUT(MEMORY_E, exit_sske);
|
||||
}
|
||||
|
||||
if (args->output == NULL) {
|
||||
ERROR_OUT(BUFFER_ERROR, exit_sske);
|
||||
}
|
||||
|
||||
XMEMCPY(args->input, args->output + RECORD_HEADER_SZ,
|
||||
args->inputSz);
|
||||
ret = BuildMessage(ssl, args->output, args->sendSz,
|
||||
|
|
|
@ -5670,6 +5670,7 @@ int AES_GCM_encrypt_C(Aes* aes, byte* out, const byte* in, word32 sz,
|
|||
#endif
|
||||
ctr = counter;
|
||||
XMEMSET(initialCounter, 0, AES_BLOCK_SIZE);
|
||||
XMEMSET(scratch, 0, AES_BLOCK_SIZE);
|
||||
if (ivSz == GCM_NONCE_MID_SZ) {
|
||||
XMEMCPY(initialCounter, iv, ivSz);
|
||||
initialCounter[AES_BLOCK_SIZE - 1] = 1;
|
||||
|
@ -6681,6 +6682,7 @@ int wc_AesCcmEncrypt(Aes* aes, byte* out, const byte* in, word32 inSz,
|
|||
authTagSz > AES_BLOCK_SIZE)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
XMEMSET(A, 0, sizeof(A));
|
||||
XMEMCPY(B+1, nonce, nonceSz);
|
||||
lenSz = AES_BLOCK_SIZE - 1 - (byte)nonceSz;
|
||||
B[0] = (authInSz > 0 ? 64 : 0)
|
||||
|
|
Loading…
Reference in New Issue