diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-03-08 22:39:42 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-11-12 17:35:46 +0100 |
commit | 2cb990080bb668a766cd13dfc9ec3ccbd4529cbf (patch) | |
tree | 231ecf78425da8f70edf2c6117542aae19729ec4 /src/main/java/com | |
parent | dbf8d7a6e0b62a8177d9e07ff664d41ccde6f2a9 (diff) |
Fix null reference in TunnelEncapsAttribute
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/lumaserv/bgp/protocol/attribute/TunnelEncapsAttribute.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/lumaserv/bgp/protocol/attribute/TunnelEncapsAttribute.java b/src/main/java/com/lumaserv/bgp/protocol/attribute/TunnelEncapsAttribute.java index ee6941f..df3ee42 100644 --- a/src/main/java/com/lumaserv/bgp/protocol/attribute/TunnelEncapsAttribute.java +++ b/src/main/java/com/lumaserv/bgp/protocol/attribute/TunnelEncapsAttribute.java @@ -165,9 +165,9 @@ public class TunnelEncapsAttribute implements PathAttribute { public static final int TYPE = Encapsulation.TYPE; WireGuard(byte[] src, int offset, int length) { + publicKey = new byte[32]; if (length == 32) { // Type 1 flags = 0; - publicKey = new byte[32]; System.arraycopy(src, offset, publicKey, 0, 32); } else if (length >= 4 + 32) { // Type 2 flags = src[offset] | FLAG_TYPE_2; |