| Workaround for https://crbug.com/988025. |
| |
| --- src/lib/crypto/krb/prng.c |
| +++ src/lib/crypto/krb/prng.c |
| @@ -102,6 +102,11 @@ k5_get_os_entropy(unsigned char *buf, size_t len, int strong) |
| #if defined(__linux__) && defined(SYS_getrandom) |
| int r; |
| |
| + // https://crbug.com/988025: Workaround for uninitialized memory errors |
| + // under MSAN. Memory sanitizer does not track memory writes by |
| + // SYS_getrandom calls. |
| + memset(buf, 0, len); |
| + |
| while (len > 0) { |
| /* |
| * Pull from the /dev/urandom pool, but require it to have been seeded. |