From Sean Bright via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6815 :
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 9 Feb 2012 19:17:28 +0000 (19:17 +0000)
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 9 Feb 2012 19:17:28 +0000 (19:17 +0000)
Don't use tvb_get_ptr() to retrieve a string being sent into
proto_tree_add_string_format(): use tvb_get_ephemeral_string() instead.

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

epan/dissectors/packet-iax2.c

index 1ba31b3fef33c51dcb1c9ab67d33337004efc41a..7ffea5636ce588a6a9b73064ecf08b4166ac18c2 100644 (file)
@@ -1366,7 +1366,7 @@ static guint32 dissect_ies (tvbuff_t * tvb, guint32 offset,
                 break;
 
               default:
                 break;
 
               default:
-                ptr = tvb_get_ptr(tvb, offset + 2, ies_len);
+                ptr = tvb_get_ephemeral_string(tvb, offset + 2, ies_len);
                 ie_item =
                   proto_tree_add_string_format(ies_tree, hf_IAX_IE_UNKNOWN_BYTES,
                                                tvb, offset+2, ies_len, ptr,
                 ie_item =
                   proto_tree_add_string_format(ies_tree, hf_IAX_IE_UNKNOWN_BYTES,
                                                tvb, offset+2, ies_len, ptr,