]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix dms
authorMichael Jerris <mike@jerris.com>
Thu, 21 Jun 2007 15:14:46 +0000 (15:14 +0000)
committerMichael Jerris <mike@jerris.com>
Thu, 21 Jun 2007 15:14:46 +0000 (15:14 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@286 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/openzap/src/isdn/Q931ie.c

index 8d1efe8b77604898041116fca19008e036784f27..2f4fa60b0719c220f04007a5cc9e102ce513e12a 100644 (file)
@@ -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++;
         }
     }