mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
ASSERT seatbelts for low-level vector accesses
This commit is contained in:
parent
c61360e181
commit
3505827982
2 changed files with 5 additions and 2 deletions
|
@ -43,6 +43,7 @@ Frame::Frame(int arg_size, const ScriptFunc* func, const zeek::Args* fn_args)
|
|||
void Frame::SetElement(int n, ValPtr v)
|
||||
{
|
||||
n += current_offset;
|
||||
ASSERT(n >= 0 && n < size);
|
||||
frame[n] = std::move(v);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue