Do not handle BER bitstring as ASCII string, because this will fail
authorstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 27 Jan 2014 09:57:24 +0000 (09:57 +0000)
committerstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 27 Jan 2014 09:57:24 +0000 (09:57 +0000)
when the first bit is set.

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

epan/dissectors/packet-ber.c

index c2d3cf19b430c61c9f697dd06ca77e7a07cb4807..8a974f38c8be087bf562ca90680c018e83412c13 100644 (file)
@@ -4893,7 +4893,7 @@ dissect_ber_constrained_bitstring(gboolean implicit_tag, asn1_ctx_t *actx, proto
         sep  = " (";
         term = FALSE;
         nb = named_bits;
-        bitstring = tvb_get_string(wmem_packet_scope(), tvb, offset, len);
+        bitstring = tvb_memdup(wmem_packet_scope(), tvb, offset, len);
 
         while (nb->p_id) {
             if ((len > 0) && (nb->bit < (8*len-pad))) {