mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 03:58:20 +00:00
Fix a few Coverity warnings from the session manager work
- Be explicit about setting the copied flag in session::Key. Coverity seems confused about when that flag is set if it gets set by default initialization. This should fix 1452757 and 1452759. - Explicitly copy the fields in ConnKey instead of using memcpy. Fixes 1452758.
This commit is contained in:
parent
b3fe264faf
commit
36d5116628
3 changed files with 20 additions and 9 deletions
|
@ -7,8 +7,11 @@ namespace zeek::session::detail {
|
|||
Key::Key(const void* session, size_t size, bool copy) : size(size)
|
||||
{
|
||||
data = reinterpret_cast<const uint8_t*>(session);
|
||||
|
||||
if ( copy )
|
||||
CopyData();
|
||||
|
||||
copied = copy;
|
||||
}
|
||||
|
||||
Key::Key(Key&& rhs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue