From 936459a5c0a9165c25ef077c8fea25afa405381c Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Thu, 21 Jun 2007 15:14:46 +0000 Subject: [PATCH] fix dms git-svn-id: http://svn.openzap.org/svn/openzap/trunk@286 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/openzap/src/isdn/Q931ie.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/openzap/src/isdn/Q931ie.c b/libs/openzap/src/isdn/Q931ie.c index 8d1efe8b77..2f4fa60b07 100644 --- a/libs/openzap/src/isdn/Q931ie.c +++ b/libs/openzap/src/isdn/Q931ie.c @@ -1205,7 +1205,10 @@ L3INT Q931Uie_ChanID(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *pMsg, L3UCHAR * /* Octet 3.3 */ /* Temp fix. Assume B channel. H channels not supported */ pie->ChanSlot = IBuf[Octet+Off] & 0x7f; - Off = Q931ReadExt(&IBuf[Octet+Off], Off); + /* Some dialects don't follow the extension coding properly for this, but this should be safe for all */ + if (Octet + Off -1 != IESize) { + Off = Q931ReadExt(&IBuf[Octet+Off], Off); + } Off++; } }