Wireshark-bugs: [Wireshark-bugs] [Bug 7893] Bluetooth: Add support for AVDTP/A2DP/VDP and SBC co
Date: Wed, 07 Aug 2013 23:34:54 +0000

changed bug 7893

What Removed Added
CC   jeff.morriss.ws@gmail.com

Comment # 27 on bug 7893 from
About patch 5 (attachment 11111 [details]):

I got some compiler warnings:

~~~
../../../epan/dissectors/packet-btavdtp.c: In function 'dissect_btvdp':
../../../epan/dissectors/packet-btavdtp.c:2191:36: error:
'sep_data.content_protection_type' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
../../../epan/dissectors/packet-btavdtp.c:2181:20: error: 'sep_data.codec' may
be used uninitialized in this function [-Werror=maybe-uninitialized]
../../../epan/dissectors/packet-btavdtp.c: In function 'dissect_bta2dp':
../../../epan/dissectors/packet-btavdtp.c:2063:36: error:
'sep_data.content_protection_type' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
../../../epan/dissectors/packet-btavdtp.c:2053:20: error: 'sep_data.codec' may
be used uninitialized in this function [-Werror=maybe-uninitialized]
cc1: all warnings being treated as errors
~~~

Which I fixed by changing:

~~~
     if (data)
        sep_data = *((sep_data_t *) data);
~~~

To:

~~~
    DISSECTOR_ASSERT(data);
    sep_data = *((sep_data_t *) data);
~~~

Since, well, it'll crash if 'data' wasn't passed in.

Then I got some more warnings related to the additional 'const' you added:

~~~
../../ui/tap-rtp-common.c: In function ���rtpstream_packet���:
../../ui/tap-rtp-common.c:205:36: error: assignment discards ���const���
qualifier from pointer target type [-Werror]
../../ui/tap-rtp-common.c: In function ���rtp_packet_analyse���:
../../ui/tap-rtp-common.c:592:6: error: passing argument 1 of
���get_dyn_pt_clock_rate��� discards ���const��� qualifier from pointer target
type [-Werror]
../../ui/tap-rtp-common.c:420:1: note: expected ���gchar *��� but argument is
of type ���const gchar * const���
cc1: all warnings being treated as errors
~~~

but I was able to fix those easily enough.

After all that, unfortunately, Valgrind complained when about some stuff when I
ran it on the sample capture here.

~~~==29168== Conditional jump or move depends on uninitialised value(s)
==29168==    at 0x6328778: dissect_bta2dp (packet-btavdtp.c:2063)
==29168==    by 0x61F8DBE: call_dissector_through_handle (packet.c:436)
==29168==    by 0x61F959C: call_dissector_work (packet.c:534)
==29168==    by 0x61FB370: call_dissector_with_data (packet.c:2072)
==29168==    by 0x632B0FF: dissect_btavdtp (packet-btavdtp.c:1084)
==29168==    by 0x61F8D77: call_dissector_through_handle (packet.c:440)
==29168==    by 0x61F959C: call_dissector_work (packet.c:534)
==29168==    by 0x61F9DCF: dissector_try_uint_new (packet.c:951)
==29168==    by 0x61F9E26: dissector_try_uint (packet.c:977)
==29168==    by 0x6344F38: dissect_b_frame.constprop.12 (packet-btl2cap.c:1340)
==29168==    by 0x63460B4: dissect_btl2cap (packet-btl2cap.c:1869)
==29168==    by 0x61F8D77: call_dissector_through_handle (packet.c:440)
==29168== 
==29168== Conditional jump or move depends on uninitialised value(s)
==29168==    at 0x622DCD7: try_val_to_str_idx (value_string.c:86)
==29168==    by 0x622DD5D: try_val_to_str (value_string.c:103)
==29168==    by 0x622DD7D: val_to_str_const (value_string.c:66)
==29168==    by 0x632878F: dissect_bta2dp (packet-btavdtp.c:2064)
==29168==    by 0x61F8DBE: call_dissector_through_handle (packet.c:436)
==29168==    by 0x61F959C: call_dissector_work (packet.c:534)
==29168==    by 0x61FB370: call_dissector_with_data (packet.c:2072)
==29168==    by 0x632B0FF: dissect_btavdtp (packet-btavdtp.c:1084)
==29168==    by 0x61F8D77: call_dissector_through_handle (packet.c:440)
==29168==    by 0x61F959C: call_dissector_work (packet.c:534)
==29168==    by 0x61F9DCF: dissector_try_uint_new (packet.c:951)
==29168==    by 0x61F9E26: dissector_try_uint (packet.c:977)
==29168== 
==29168== Conditional jump or move depends on uninitialised value(s)
==29168==    at 0x622DCE6: try_val_to_str_idx (value_string.c:86)
==29168==    by 0x622DD5D: try_val_to_str (value_string.c:103)
==29168==    by 0x622DD7D: val_to_str_const (value_string.c:66)
==29168==    by 0x632878F: dissect_bta2dp (packet-btavdtp.c:2064)
==29168==    by 0x61F8DBE: call_dissector_through_handle (packet.c:436)
==29168==    by 0x61F959C: call_dissector_work (packet.c:534)
==29168==    by 0x61FB370: call_dissector_with_data (packet.c:2072)
==29168==    by 0x632B0FF: dissect_btavdtp (packet-btavdtp.c:1084)
==29168==    by 0x61F8D77: call_dissector_through_handle (packet.c:440)
==29168==    by 0x61F959C: call_dissector_work (packet.c:534)
==29168==    by 0x61F9DCF: dissector_try_uint_new (packet.c:951)
==29168==    by 0x61F9E26: dissector_try_uint (packet.c:977)
==29168== 
==29168== Conditional jump or move depends on uninitialised value(s)
==29168==    at 0x6784402: dissect_rtp (packet-rtp.c:1957)
==29168==    by 0x61F8D77: call_dissector_through_handle (packet.c:440)
==29168==    by 0x61F959C: call_dissector_work (packet.c:534)
==29168==    by 0x61FB370: call_dissector_with_data (packet.c:2072)
==29168==    by 0x632885E: dissect_bta2dp (packet-btavdtp.c:2096)
==29168==    by 0x61F8DBE: call_dissector_through_handle (packet.c:436)
==29168==    by 0x61F959C: call_dissector_work (packet.c:534)
==29168==    by 0x61FB370: call_dissector_with_data (packet.c:2072)
==29168==    by 0x632B0FF: dissect_btavdtp (packet-btavdtp.c:1084)
==29168==    by 0x61F8D77: call_dissector_through_handle (packet.c:440)
==29168==    by 0x61F959C: call_dissector_work (packet.c:534)
==29168==    by 0x61F9DCF: dissector_try_uint_new (packet.c:951)
==29168== 
==29168== Conditional jump or move depends on uninitialised value(s)
==29168==    at 0x6782271: process_rtp_payload (packet-rtp.c:1069)
==29168==    by 0x6784A8A: dissect_rtp (packet-rtp.c:1977)
==29168==    by 0x61F8D77: call_dissector_through_handle (packet.c:440)
==29168==    by 0x61F959C: call_dissector_work (packet.c:534)
==29168==    by 0x61FB370: call_dissector_with_data (packet.c:2072)
==29168==    by 0x632885E: dissect_bta2dp (packet-btavdtp.c:2096)
==29168==    by 0x61F8DBE: call_dissector_through_handle (packet.c:436)
==29168==    by 0x61F959C: call_dissector_work (packet.c:534)
==29168==    by 0x61FB370: call_dissector_with_data (packet.c:2072)
==29168==    by 0x632B0FF: dissect_btavdtp (packet-btavdtp.c:1084)
==29168==    by 0x61F8D77: call_dissector_through_handle (packet.c:440)
==29168==    by 0x61F959C: call_dissector_work (packet.c:534)
~~~

Those warnings don't come out without the patch applied so I think more work is
needed.

I'll attach what my SVN had (patch5 + my changes to get it to compile) as a
starting point.


You are receiving this mail because:
  • You are watching all bug changes.