mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 11:57:32 +09:00
Add extra check for assembler buffer space.
This commit is contained in:
parent
0a3b3b6264
commit
ac3468d5cc
1 changed files with 2 additions and 1 deletions
|
|
@ -93,7 +93,8 @@ namespace jit {
|
|||
|
||||
void ensureSpace(size_t space)
|
||||
{
|
||||
if (MOZ_UNLIKELY(!m_buffer.reserve(m_buffer.length() + space)))
|
||||
if (MOZ_UNLIKELY(m_buffer.length() > (SIZE_MAX - space) ||
|
||||
!m_buffer.reserve(m_buffer.length() + space)))
|
||||
oomDetected();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue