From Martin Mathieson:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 27 Jun 2006 22:04:35 +0000 (22:04 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 27 Jun 2006 22:04:35 +0000 (22:04 +0000)
Fix Bug 976

Looking at frame 170 in the trace, it looks like
tvb_get_ephemeral_text() struggles with the null character in the middle
of the 4th parameter (in the WWW-Authenticate header) and returns NULL.
The attached patch uses tvb_format_text() instead which also does a
better job of showing the string.

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

epan/dissectors/packet-sip.c

index 527cc9448f183b0907e2f0c00f40c39860ffa249..a6f852fb5767ebdb5ff3c51e37f34f325daab8bb 100644 (file)
@@ -1087,8 +1087,8 @@ dissect_sip_authorization_item(tvbuff_t *tvb, proto_tree *tree, gint start_offse
        if (i == array_length(auth_parameters_hf_array))
        {
                proto_tree_add_text(tree, tvb, start_offset, current_offset-start_offset,
-                                   tvb_get_ephemeral_string(tvb, start_offset,
-                                                            current_offset-start_offset));
+                                   tvb_format_text(tvb, start_offset,
+                                                   current_offset-start_offset));
        }
 
        return current_offset;