Fix wrong length of CSeq Method parameter
authorkukosa <kukosa@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 25 Aug 2010 14:10:58 +0000 (14:10 +0000)
committerkukosa <kukosa@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 25 Aug 2010 14:10:58 +0000 (14:10 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33920 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-sip.c

index 607e5b2f19a71ed27a5fddb3af3e8a45b03ff5eb..f13e48b940101fe18169fec1856d2c510a23d976 100644 (file)
@@ -2297,7 +2297,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
                                                        }
                                                }
 
-                                               if (sub_value_offset == linelen)
+                                               if (sub_value_offset == value_len)
                                                {
                                                        /* Didn't find method name */
                                                        THROW(ReportedBoundsError);
@@ -2305,7 +2305,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
                                                }
 
                                                /* Extract method name from value */
-                                               strlen_to_copy = (int)linelen-sub_value_offset;
+                                               strlen_to_copy = (int)value_len-sub_value_offset;
                                                if (strlen_to_copy > MAX_CSEQ_METHOD_SIZE) {
                                                        /* Note the error in the protocol tree */
                                                        if (hdr_tree) {