summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorxskingdom <xskingdom@gmail.com>2021-02-24 13:38:41 +0800
committerxskingdom <xskingdom@gmail.com>2021-02-24 13:38:41 +0800
commit3c6f5dafdc58099800b6b8705c2d12f6d964de0b (patch)
tree5160b7398e51ea8602549b7922958ee820be1b89
parent65d094d7f25e7304832b104f429449cbcd22770d (diff)
Fix ParseValue's bug for BMPStatsTLV32
-rw-r--r--pkg/packet/bmp/bmp.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/packet/bmp/bmp.go b/pkg/packet/bmp/bmp.go
index d111d251..a704b907 100644
--- a/pkg/packet/bmp/bmp.go
+++ b/pkg/packet/bmp/bmp.go
@@ -225,7 +225,7 @@ func (s *BMPStatsTLV32) ParseValue(data []byte) error {
if s.Length != 4 {
return fmt.Errorf("invalid length: %d bytes (%d bytes expected)", s.Length, 4)
}
- s.Value = binary.BigEndian.Uint32(data[:8])
+ s.Value = binary.BigEndian.Uint32(data[:4])
return nil
}