Heuristic standard detection:
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 8 Feb 2012 03:18:04 +0000 (03:18 +0000)
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 8 Feb 2012 03:18:04 +0000 (03:18 +0000)
 - Grab optional parameters for LUDT/LUDTS
 - Fix processing of the 2-octet pointers

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@40923 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-sccp.c

index a07fc9395b9e3988ff4e11417127d61e2081af7e..ba37d39acd3fee52a2ba4706805ac56f97602975 100644 (file)
@@ -1000,6 +1000,18 @@ looks_like_valid_sccp(guint32 frame_num _U_, tvbuff_t *tvb, guint8 my_mtp3_stand
            if (msgtype == SCCP_MSG_TYPE_XUDT || msgtype == SCCP_MSG_TYPE_XUDTS) {
                opt_ptr = tvb_get_guint8(tvb, offset);
                offset += POINTER_LENGTH;
+           } else if (msgtype == SCCP_MSG_TYPE_LUDT || msgtype == SCCP_MSG_TYPE_LUDTS) {
+               opt_ptr = tvb_get_letohs(tvb, offset);
+               offset += POINTER_LENGTH_LONG;
+           }
+
+           if (msgtype == SCCP_MSG_TYPE_LUDT || msgtype == SCCP_MSG_TYPE_LUDTS) {
+               /* Long pointers count from the 2nd (MSB) octet of the pointer */
+               called_ptr += 1;
+               calling_ptr += 1;
+               data_ptr += 1;
+               if (opt_ptr)
+                   opt_ptr += 1;
            }
 
            /* Check that the variable pointers are within bounds */