diff options
Diffstat (limited to 'satp/packet.go')
-rw-r--r-- | satp/packet.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/satp/packet.go b/satp/packet.go index a24b69a..7e638fa 100644 --- a/satp/packet.go +++ b/satp/packet.go @@ -96,7 +96,9 @@ type EncryptedPacket struct { func NewEncryptedPacket(AuthTagLength uint) (ep *EncryptedPacket) { ep = &EncryptedPacket{} - ep.AuthTag = make([]byte, AuthTagLength) + if AuthTagLength > 0 { + ep.AuthTag = make([]byte, AuthTagLength) + } return } |