mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
Merge remote-tracking branch 'origin/topic/timw/coverity-findings'
* origin/topic/timw/coverity-findings: Fix a number of Coverity findings
This commit is contained in:
commit
2021df7418
7 changed files with 19 additions and 7 deletions
10
CHANGES
10
CHANGES
|
@ -1,3 +1,13 @@
|
|||
4.1.0-dev.891 | 2021-07-06 08:49:50 -0700
|
||||
|
||||
* Fix a number of Coverity findings (Tim Wojtulewicz, Corelight)
|
||||
|
||||
- 1458048: Use-after-free in the SQLite logger
|
||||
- 1457823: Missing a break statement in script-opt reduction
|
||||
- 1453966: Dead code in CompHash
|
||||
- 1445417: Unintialized variable in StaticHash64
|
||||
- 1437716: Unintialized variables in FileInfo in scan.l
|
||||
|
||||
4.1.0-dev.889 | 2021-07-06 08:48:50 -0700
|
||||
|
||||
* Add a few DNS query types. (Johanna Amann, Corelight)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
4.1.0-dev.889
|
||||
4.1.0-dev.891
|
||||
|
|
|
@ -512,7 +512,7 @@ int CompositeHash::SingleTypeKeySize(Type* bt, const Val* v,
|
|||
if ( ! v )
|
||||
return (optional && ! calc_static_size) ? sz : 0;
|
||||
|
||||
const RecordVal* rv = v ? v->AsRecordVal() : nullptr;
|
||||
const RecordVal* rv = v->AsRecordVal();
|
||||
RecordType* rt = bt->AsRecordType();
|
||||
int num_fields = rt->NumFields();
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ void KeyedHash::Hash256(const void* bytes, uint64_t size, hash256_t* result)
|
|||
|
||||
hash64_t KeyedHash::StaticHash64(const void* bytes, uint64_t size)
|
||||
{
|
||||
hash64_t result;
|
||||
hash64_t result = 0;
|
||||
highwayhash::InstructionSets::Run<highwayhash::HighwayHash>(cluster_highwayhash_key, reinterpret_cast<const char *>(bytes), size, &result);
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -169,15 +169,16 @@ bool SQLite::DoInit(const WriterInfo& info, int arg_num_fields,
|
|||
}
|
||||
|
||||
create += fieldname;
|
||||
sqlite3_free(fieldname);
|
||||
|
||||
string type = GetTableType(field->type, field->subtype);
|
||||
if ( type == "" )
|
||||
{
|
||||
InternalError(Fmt("Could not determine type for field %u:%s", i, fieldname));
|
||||
sqlite3_free(fieldname);
|
||||
return false;
|
||||
}
|
||||
|
||||
sqlite3_free(fieldname);
|
||||
create += " " + type;
|
||||
|
||||
/* if ( !field->optional ) {
|
||||
|
|
|
@ -106,9 +106,9 @@ public:
|
|||
|
||||
YY_BUFFER_STATE buffer_state;
|
||||
std::string restore_module;
|
||||
const char* name;
|
||||
int line;
|
||||
int level;
|
||||
const char* name = nullptr;
|
||||
int line = 0;
|
||||
int level = 0;
|
||||
};
|
||||
|
||||
// A stack of input buffers we're scanning. file_stack[len-1] is the
|
||||
|
|
|
@ -959,6 +959,7 @@ TraversalCode CSE_ValidityChecker::PreExpr(const Expr* e)
|
|||
return TC_ABORTALL;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case EXPR_APPEND_TO:
|
||||
// This doesn't directly change any identifiers, but does
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue