mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
Deprecate VectorVal::Assign methods taking raw Val*
And adapt usages to pass in to alternate method taking IntrusivePtr
This commit is contained in:
parent
2cbf36721c
commit
de1e3d7d6d
15 changed files with 77 additions and 54 deletions
|
@ -362,7 +362,7 @@ void file_analysis::X509::ParseSAN(X509_EXTENSION* ext)
|
|||
#else
|
||||
const char* name = (const char*) ASN1_STRING_get0_data(gen->d.ia5);
|
||||
#endif
|
||||
StringVal* bs = new StringVal(name);
|
||||
auto bs = make_intrusive<StringVal>(name);
|
||||
|
||||
switch ( gen->type )
|
||||
{
|
||||
|
@ -370,21 +370,21 @@ void file_analysis::X509::ParseSAN(X509_EXTENSION* ext)
|
|||
if ( names == nullptr )
|
||||
names = make_intrusive<VectorVal>(zeek::id::string_vec);
|
||||
|
||||
names->Assign(names->Size(), bs);
|
||||
names->Assign(names->Size(), std::move(bs));
|
||||
break;
|
||||
|
||||
case GEN_URI:
|
||||
if ( uris == nullptr )
|
||||
uris = make_intrusive<VectorVal>(zeek::id::string_vec);
|
||||
|
||||
uris->Assign(uris->Size(), bs);
|
||||
uris->Assign(uris->Size(), std::move(bs));
|
||||
break;
|
||||
|
||||
case GEN_EMAIL:
|
||||
if ( emails == nullptr )
|
||||
emails = make_intrusive<VectorVal>(zeek::id::string_vec);
|
||||
|
||||
emails->Assign(emails->Size(), bs);
|
||||
emails->Assign(emails->Size(), std::move(bs));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue