mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 11:38:20 +00:00
Fix misc. issues reported by Coverity.
Some uninitialized values, a possible null pointer dereference, and time-of-check-time-of-use on reading random seed file.
This commit is contained in:
parent
50784c64bc
commit
38ae7c98b4
10 changed files with 22 additions and 12 deletions
|
@ -1518,7 +1518,6 @@ int Manager::PutTable(Stream* i, const Value* const *vals)
|
|||
EnumVal* ev;
|
||||
int startpos = 0;
|
||||
Val* predidx = ValueToRecordVal(vals, stream->itype, &startpos);
|
||||
Ref(valval);
|
||||
|
||||
if ( updated )
|
||||
ev = new EnumVal(BifEnum::Input::EVENT_CHANGED,
|
||||
|
@ -1529,7 +1528,10 @@ int Manager::PutTable(Stream* i, const Value* const *vals)
|
|||
|
||||
bool result;
|
||||
if ( stream->num_val_fields > 0 ) // we have values
|
||||
{
|
||||
Ref(valval);
|
||||
result = CallPred(stream->pred, 3, ev, predidx, valval);
|
||||
}
|
||||
else // no values
|
||||
result = CallPred(stream->pred, 2, ev, predidx);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue