Message ID | 20241123061519.64127F80533@alsa1.perex.cz (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | TLVs with (size % 4) != 0 make amixer and alsactl crash | expand |
diff --git a/amixer/amixer.c b/amixer/amixer.c index 8b8000b..03cc9cb 100644 --- a/amixer/amixer.c +++ b/amixer/amixer.c @@ -587,7 +587,7 @@ static void decode_tlv(unsigned int spaces, unsigned int *tlv, unsigned int tlv_ #endif default: printf("unk-%u-", type); - while (size > 0) { + while (size >= sizeof(unsigned int)) { printf("0x%08x,", tlv[idx++]); size -= sizeof(unsigned int); }