[VOL-4755] omci-lib-go: panic during serialization of extended GetAllAlarmsNextResponse
Change-Id: I5c54f37f2284db3d9ba3379617bbe38d7bed96e0
diff --git a/VERSION b/VERSION
index ccbccc3..c043eea 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.2.0
+2.2.1
diff --git a/alarms.go b/alarms.go
index 2bf61b5..2bb163c 100644
--- a/alarms.go
+++ b/alarms.go
@@ -21,6 +21,7 @@
"encoding/binary"
"errors"
"fmt"
+
"github.com/google/gopacket"
me "github.com/opencord/omci-lib-go/v2/generated"
)
@@ -513,7 +514,7 @@
contentLength += 2 // Length field
if omci.AdditionalAlarms != nil {
extraMEs = len(omci.AdditionalAlarms)
- contentLength += extraMEs*4 + 28
+ contentLength += extraMEs * (4 + 28)
}
}
if contentLength > maxLength {