OSDN Git Service

monitor: Fix AVRCP GetElementAttributes
authorVikrampal Yadav <vikram.pal@samsung.com>
Wed, 12 Nov 2014 08:53:15 +0000 (14:23 +0530)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 12 Nov 2014 15:20:47 +0000 (17:20 +0200)
commit84f3de0df83ffaca5a2a916fdc86ef0a0888fa1f
tree2aa0daf84f288a6dbeb936a29751153ac78fa6e2
parent56dacf9b908e81d6d10b1be6d31258b10cf1a278
monitor: Fix AVRCP GetElementAttributes

AttributeValueLength can be 0 which would lead to use uninitialized
memory, with this changes it now workds properly:

      AVCTP Control: Response: type 0x00 label 0 PID 0x110e
        AV/C: Stable: address 0x48 opcode 0x00
          Subunit: Panel
          Opcode: Vendor Dependent
          Company ID: 0x001958
          AVRCP: GetElementAttributes pt Single len 0x0019
            AttributeCount: 0x03
            Attribute: 0x00000001 (Title)
            CharsetID: 0x006a (UTF-8)
            AttributeValueLength: 0x0000
            AttributeValue:
            Attribute: 0x00000002 (Artist)
            CharsetID: 0x006a (UTF-8)
            AttributeValueLength: 0x0000
            AttributeValue:
            Attribute: 0x00000003 (Album)
            CharsetID: 0x006a (UTF-8)
            AttributeValueLength: 0x0000
            AttributeValue:
monitor/avctp.c