mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Merge remote-tracking branch 'origin/topic/timw/silly-coverity-fix'
* origin/topic/timw/silly-coverity-fix: Check for -1 return from FieldOffset() in Val::HasField()
This commit is contained in:
commit
e6e41ac5d9
3 changed files with 8 additions and 2 deletions
6
CHANGES
6
CHANGES
|
@ -1,3 +1,9 @@
|
||||||
|
4.1.0-dev.814 | 2021-06-28 11:06:39 -0700
|
||||||
|
|
||||||
|
* Check for -1 return from FieldOffset() in Val::HasField()
|
||||||
|
|
||||||
|
Fixes Coverity 1457804 (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
4.1.0-dev.812 | 2021-06-28 11:02:46 -0700
|
4.1.0-dev.812 | 2021-06-28 11:02:46 -0700
|
||||||
|
|
||||||
* whoops overlooked the need to canonicalize filenames (Vern Paxson, Corelight)
|
* whoops overlooked the need to canonicalize filenames (Vern Paxson, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
4.1.0-dev.812
|
4.1.0-dev.814
|
||||||
|
|
|
@ -1218,7 +1218,7 @@ public:
|
||||||
bool HasField(const char *field) const
|
bool HasField(const char *field) const
|
||||||
{
|
{
|
||||||
int idx = GetType()->AsRecordType()->FieldOffset(field);
|
int idx = GetType()->AsRecordType()->FieldOffset(field);
|
||||||
return HasField(idx);
|
return (idx != -1) && HasField(idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue