mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
Add null check when getting key size for List types. Fixes coverity finding 1058242
This commit is contained in:
parent
9c8db5f6ca
commit
40d4004453
1 changed files with 3 additions and 0 deletions
|
@ -545,6 +545,9 @@ int CompositeHash::SingleTypeKeySize(BroType* bt, const Val* v,
|
|||
|
||||
case TYPE_LIST:
|
||||
{
|
||||
if ( ! v )
|
||||
return (optional && ! calc_static_size) ? sz : 0;
|
||||
|
||||
sz = SizeAlign(sz, sizeof(int));
|
||||
ListVal* lv = const_cast<ListVal*>(v->AsListVal());
|
||||
for ( int i = 0; i < lv->Length(); ++i )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue