mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
fix visual studio code analysis warnings
This commit is contained in:
@@ -16044,7 +16044,7 @@ int DoSessionTicket(WOLFSSL* ssl,
|
|||||||
byte peerCookie[MAX_COOKIE_LEN];
|
byte peerCookie[MAX_COOKIE_LEN];
|
||||||
byte peerCookieSz = 0;
|
byte peerCookieSz = 0;
|
||||||
byte cookieType;
|
byte cookieType;
|
||||||
byte cookieSz;
|
byte cookieSz = 0;
|
||||||
#endif /* WOLFSSL_DTLS */
|
#endif /* WOLFSSL_DTLS */
|
||||||
|
|
||||||
#ifdef WOLFSSL_CALLBACKS
|
#ifdef WOLFSSL_CALLBACKS
|
||||||
|
@@ -2120,6 +2120,10 @@ int wolfSSL_set_group_messages(WOLFSSL* ssl)
|
|||||||
/* make minVersion the internal equivalent SSL version */
|
/* make minVersion the internal equivalent SSL version */
|
||||||
static int SetMinVersionHelper(byte* minVersion, int version)
|
static int SetMinVersionHelper(byte* minVersion, int version)
|
||||||
{
|
{
|
||||||
|
#ifdef NO_TLS
|
||||||
|
(void)minVersion;
|
||||||
|
#endif
|
||||||
|
|
||||||
switch (version) {
|
switch (version) {
|
||||||
#if defined(WOLFSSL_ALLOW_SSLV3) && !defined(NO_OLD_TLS)
|
#if defined(WOLFSSL_ALLOW_SSLV3) && !defined(NO_OLD_TLS)
|
||||||
case WOLFSSL_SSLV3:
|
case WOLFSSL_SSLV3:
|
||||||
|
@@ -365,6 +365,9 @@ int Base16_Decode(const byte* in, word32 inLen, byte* out, word32* outLen)
|
|||||||
word32 inIdx = 0;
|
word32 inIdx = 0;
|
||||||
word32 outIdx = 0;
|
word32 outIdx = 0;
|
||||||
|
|
||||||
|
if (in == NULL || out == NULL || outLen == NULL)
|
||||||
|
return BAD_FUNC_ARG;
|
||||||
|
|
||||||
if (inLen == 1 && *outLen && in) {
|
if (inLen == 1 && *outLen && in) {
|
||||||
byte b = in[inIdx++] - 0x30; /* 0 starts at 0x30 */
|
byte b = in[inIdx++] - 0x30; /* 0 starts at 0x30 */
|
||||||
|
|
||||||
@@ -419,6 +422,9 @@ int Base16_Encode(const byte* in, word32 inLen, byte* out, word32* outLen)
|
|||||||
word32 i;
|
word32 i;
|
||||||
byte hb, lb;
|
byte hb, lb;
|
||||||
|
|
||||||
|
if (in == NULL || out == NULL || outLen == NULL)
|
||||||
|
return BAD_FUNC_ARG;
|
||||||
|
|
||||||
if (*outLen < (2 * inLen + 1))
|
if (*outLen < (2 * inLen + 1))
|
||||||
return BAD_FUNC_ARG;
|
return BAD_FUNC_ARG;
|
||||||
|
|
||||||
|
@@ -361,6 +361,7 @@ static int Hash_gen(DRBG* drbg, byte* out, word32 outSz, const byte* V)
|
|||||||
drbg->lastBlock = checkBlock;
|
drbg->lastBlock = checkBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (out != NULL) {
|
||||||
if (outSz >= OUTPUT_BLOCK_LEN) {
|
if (outSz >= OUTPUT_BLOCK_LEN) {
|
||||||
XMEMCPY(out, digest, OUTPUT_BLOCK_LEN);
|
XMEMCPY(out, digest, OUTPUT_BLOCK_LEN);
|
||||||
outSz -= OUTPUT_BLOCK_LEN;
|
outSz -= OUTPUT_BLOCK_LEN;
|
||||||
@@ -372,6 +373,7 @@ static int Hash_gen(DRBG* drbg, byte* out, word32 outSz, const byte* V)
|
|||||||
outSz = 0;
|
outSz = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ForceZero(data, sizeof(data));
|
ForceZero(data, sizeof(data));
|
||||||
|
|
||||||
return DRBG_SUCCESS;
|
return DRBG_SUCCESS;
|
||||||
|
Reference in New Issue
Block a user