mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 19:18:19 +00:00
Address coverity errors.
This commit is contained in:
parent
e3e3fdfb9d
commit
5d8da0b182
4 changed files with 203 additions and 3 deletions
|
@ -66,9 +66,11 @@ type SMB1_read_andx_request(header: SMB_Header, offset: uint16) = record {
|
|||
|
||||
andx_command : SMB_andx_command(header, 1, offset+offsetof(andx_command), andx.command);
|
||||
} &let {
|
||||
offset_high_64 : uint64 = offset_high;
|
||||
offset_high : uint32 = (word_count == 0x0C && offset_high_tmp != 0xffffffff) ? offset_high_tmp : 0;
|
||||
read_offset : uint64 = (offset_high * 0x10000) + offset_low;
|
||||
max_count : uint64 = ((max_count_high == 0xffffffff ? 0 : max_count_high) * 0x10000) + max_count_low;
|
||||
read_offset : uint64 = ( offset_high_64 * 0x10000) + offset_low &requires(offset_high_64);
|
||||
max_count_high_64 : uint64 = max_count_high == 0xffffffff ? 0 : max_count_high;
|
||||
max_count : uint64 = ( max_count_high_64 * 0x10000) + max_count_low &requires(max_count_high_64);
|
||||
proc : bool = $context.connection.proc_smb1_read_andx_request(header, this);
|
||||
} &byteorder=littleendian;
|
||||
|
||||
|
|
|
@ -1841,6 +1841,7 @@ bool Manager::SendEvent(ReaderFrontend* reader, const string& name, const int nu
|
|||
if ( i == 0 )
|
||||
{
|
||||
reporter->InternalWarning("Unknown reader %s in SendEvent for event %s", reader->Name(), name.c_str());
|
||||
delete_value_ptr_array(vals, num_vals);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -597,7 +597,7 @@ bool Manager::AddFilter(EnumVal* id, RecordVal* fval)
|
|||
filter->num_ext_fields = 0;
|
||||
if ( filter->ext_func )
|
||||
{
|
||||
if ( filter->ext_func->FType()->YieldType()->Tag() == TYPE_RECORD )
|
||||
if ( filter->ext_func->FType()->YieldType()->Tag() == TYPE_RECORD )
|
||||
{
|
||||
filter->num_ext_fields = filter->ext_func->FType()->YieldType()->AsRecordType()->NumFields();
|
||||
}
|
||||
|
@ -609,6 +609,7 @@ bool Manager::AddFilter(EnumVal* id, RecordVal* fval)
|
|||
else
|
||||
{
|
||||
reporter->Error("Return value of log_ext is not a record (got %s)", type_name(filter->ext_func->FType()->YieldType()->Tag()));
|
||||
delete filter;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue