mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
fixes for (mostly ZAM) vector operation issues found by ASAN
This commit is contained in:
parent
35cac72984
commit
c7e5e5feea
8 changed files with 68 additions and 13 deletions
|
@ -3251,10 +3251,11 @@ bool VectorVal::Assign(unsigned int index, ValPtr element) {
|
|||
|
||||
if ( yield_types ) {
|
||||
const auto& t = element->GetType();
|
||||
(*yield_types)[index] = t;
|
||||
auto& yt_i = (*yield_types)[index];
|
||||
auto& elem = vector_val[index];
|
||||
if ( elem )
|
||||
ZVal::DeleteIfManaged(*elem, t);
|
||||
ZVal::DeleteIfManaged(*elem, yt_i);
|
||||
yt_i = t;
|
||||
elem = ZVal(std::move(element), t);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue