From e2601545df68684fa50d125bf44a40e6f75095af Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 6 Dec 2017 15:09:08 +0800 Subject: [PATCH] sv: fix invalid length ASN.1 BER length field for smpMod attribute --- src/sampled_values/sv_publisher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sampled_values/sv_publisher.c b/src/sampled_values/sv_publisher.c index c6c178d5..4bb663e7 100644 --- a/src/sampled_values/sv_publisher.c +++ b/src/sampled_values/sv_publisher.c @@ -410,7 +410,7 @@ SVPublisher_ASDU_encodeToBuffer(SVPublisher_ASDU self, uint8_t* buffer, int bufP /* SmpMod */ if (self->hasSmpMod) { - bufPos = BerEncoder_encodeTL(0x88, 4, buffer, bufPos); + bufPos = BerEncoder_encodeTL(0x88, 2, buffer, bufPos); bufPos = encodeUInt16FixedSize(self->smpMod, buffer, bufPos); }