mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
use len for copy-length instead of sz
This commit is contained in:
@ -2182,7 +2182,7 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
|
|||||||
len = sz;
|
len = sz;
|
||||||
/* Get one random 32-bit word from hw RNG */
|
/* Get one random 32-bit word from hw RNG */
|
||||||
rand = esp_random( );
|
rand = esp_random( );
|
||||||
XMEMCPY(output, &rand, sz);
|
XMEMCPY(output, &rand, len);
|
||||||
output += len;
|
output += len;
|
||||||
sz -= len;
|
sz -= len;
|
||||||
}
|
}
|
||||||
@ -2228,7 +2228,7 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
|
|||||||
if (sz < len)
|
if (sz < len)
|
||||||
len = sz;
|
len = sz;
|
||||||
rand = sys_rand32_get();
|
rand = sys_rand32_get();
|
||||||
XMEMCPY(output, &rand, sz);
|
XMEMCPY(output, &rand, len);
|
||||||
output += len;
|
output += len;
|
||||||
sz -= len;
|
sz -= len;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user