mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Fixes for gcc-10 and -fsanitize=undefined
for rabbit.c
* One introduced in #4156 * One from previous commit in this PR
This commit is contained in:
@ -20470,7 +20470,7 @@ int SetCipherList(WOLFSSL_CTX* ctx, Suites* suites, const char* list)
|
||||
word32 length;
|
||||
|
||||
next = XSTRSTR(next, ":");
|
||||
length = MAX_SUITE_NAME + 1;
|
||||
length = MAX_SUITE_NAME;
|
||||
if (next != NULL) {
|
||||
word32 currLen = (word32)(next - current);
|
||||
if (length > currLen) {
|
||||
|
@ -26312,7 +26312,7 @@ int wolfSSL_X509_VERIFY_PARAM_set1_ip_asc(WOLFSSL_X509_VERIFY_PARAM *param,
|
||||
param->ipasc[0] = '\0';
|
||||
}
|
||||
else {
|
||||
XSTRNCPY(param->ipasc, ipasc, WOLFSSL_MAX_IPSTR);
|
||||
XSTRNCPY(param->ipasc, ipasc, WOLFSSL_MAX_IPSTR - 1);
|
||||
param->ipasc[WOLFSSL_MAX_IPSTR-1] = '\0';
|
||||
}
|
||||
ret = WOLFSSL_SUCCESS;
|
||||
|
@ -156,10 +156,10 @@ static WC_INLINE int DoKey(Rabbit* ctx, const byte* key, const byte* iv)
|
||||
word32 k0, k1, k2, k3, i;
|
||||
|
||||
/* Generate four subkeys */
|
||||
k0 = LITTLE32(((word32*)key)[0]);
|
||||
k1 = LITTLE32(((word32*)key)[1]);
|
||||
k2 = LITTLE32(((word32*)key)[2]);
|
||||
k3 = LITTLE32(((word32*)key)[3]);
|
||||
k0 = LOAD_LE32(key + 0);
|
||||
k1 = LOAD_LE32(key + 4);
|
||||
k2 = LOAD_LE32(key + 8);
|
||||
k3 = LOAD_LE32(key + 12);
|
||||
|
||||
/* Generate initial state variables */
|
||||
ctx->masterCtx.x[0] = k0;
|
||||
|
Reference in New Issue
Block a user