jitterentropy: clear memory in jent_zalloc()

This commit is contained in:
Christian Helmuth 2023-09-05 16:09:26 +02:00
parent 119f679278
commit 41adf8d196

View File

@ -31,7 +31,12 @@ void jitterentropy_init(Genode::Allocator &alloc)
void *jent_zalloc(size_t len)
{
if (!_alloc) { return 0; }
return _alloc->alloc(len);
void *p = _alloc->alloc(len);
if (p)
Genode::memset(p, 0, len);
return p;
}