mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Merge remote-tracking branch 'origin/topic/jsiwek/coverity-1431151'
* origin/topic/jsiwek/coverity-1431151: Use constexpr for IPAddr::v4_mapped_prefix declaration
This commit is contained in:
commit
589dcf5697
4 changed files with 11 additions and 6 deletions
6
CHANGES
6
CHANGES
|
@ -1,3 +1,9 @@
|
|||
3.3.0-dev.117 | 2020-08-19 14:12:06 -0700
|
||||
|
||||
* Use constexpr for IPAddr::v4_mapped_prefix declaration
|
||||
|
||||
The inconsistent use of constexpr in the definition but not declaration
|
||||
causes an unrecoverable error for Coverity as seen in issue 1431151 (Jon Siwek, Corelight)
|
||||
|
||||
3.3.0-dev.115 | 2020-08-19 11:49:24 -0700
|
||||
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
3.3.0-dev.115
|
||||
3.3.0-dev.117
|
||||
|
|
|
@ -12,10 +12,6 @@
|
|||
|
||||
#include "analyzer/Manager.h"
|
||||
|
||||
constexpr uint8_t zeek::IPAddr::v4_mapped_prefix[12] = { 0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0xff, 0xff };
|
||||
|
||||
const zeek::IPAddr zeek::IPAddr::v4_unspecified = zeek::IPAddr(in4_addr{});
|
||||
|
||||
const zeek::IPAddr zeek::IPAddr::v6_unspecified = zeek::IPAddr();
|
||||
|
|
|
@ -459,7 +459,10 @@ private:
|
|||
|
||||
in6_addr in6; // IPv6 or v4-to-v6-mapped address
|
||||
|
||||
static const uint8_t v4_mapped_prefix[12]; // top 96 bits of v4-mapped-addr
|
||||
// Top 96 bits of a v4-mapped-addr.
|
||||
static constexpr uint8_t v4_mapped_prefix[12] = { 0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0xff, 0xff };
|
||||
};
|
||||
|
||||
inline IPAddr::IPAddr(Family family, const uint32_t* bytes, ByteOrder order)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue