]> git.alsa-project.org Git - alsa-utils.git/commitdiff
amixer: Fix parsing container TLV entries
authorTakashi Iwai <tiwai@suse.de>
Mon, 26 Nov 2012 15:13:57 +0000 (16:13 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 26 Nov 2012 15:16:16 +0000 (16:16 +0100)
Fix the wrong calculation of the size of a container TLV entry, which
resulted in "TLV size error" messages.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
amixer/amixer.c

index 48ed1b2ffe337794cbb9b9a17be806302b1899e9..5d5afcea99e0338dbeaca72478a319dddd373af3 100644 (file)
@@ -531,7 +531,7 @@ static void decode_tlv(unsigned int spaces, unsigned int *tlv, unsigned int tlv_
                                printf("TLV size error in compound!\n");
                                return;
                        }
-                       decode_tlv(spaces + 2, tlv + idx, tlv[idx+1]);
+                       decode_tlv(spaces + 2, tlv + idx, tlv[idx+1] + 8);
                        idx += 2 + (tlv[1] + sizeof(unsigned int) - 1) / sizeof(unsigned int);
                }
                break;