1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-02-17 01:52:02 +00:00

declare random_buffer as weak symbol

This commit is contained in:
Pavol Rusnak 2018-01-15 18:28:02 +01:00
parent 0d8a3beeaf
commit 72841c4fa1
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

2
rand.c
View File

@ -66,7 +66,7 @@ uint32_t random_uniform(uint32_t n)
return x / (max / n); return x / (max / n);
} }
void random_buffer(uint8_t *buf, size_t len) void __attribute__((weak)) random_buffer(uint8_t *buf, size_t len)
{ {
uint32_t r = 0; uint32_t r = 0;
for (size_t i = 0; i < len; i++) { for (size_t i = 0; i < len; i++) {