mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:27:35 +00:00
Everywhere: Use OOM-safe ByteBuffer APIs where possible
If we can easily communicate failure, let's avoid asserting and report failure instead.
This commit is contained in:
parent
6606993432
commit
3a9f00c59b
22 changed files with 135 additions and 67 deletions
|
@ -119,7 +119,10 @@ bool TLSv12::compute_master_secret_from_pre_master_secret(size_t length)
|
|||
return false;
|
||||
}
|
||||
|
||||
m_context.master_key.resize(length);
|
||||
if (!m_context.master_key.try_resize(length)) {
|
||||
dbgln("Couldn't allocate enough space for the master key :(");
|
||||
return false;
|
||||
}
|
||||
|
||||
pseudorandom_function(
|
||||
m_context.master_key,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue