[alsa-devel] [PATCH v1 2/6] usb: audio: Fix variable length field to be variable.

Jorge Sanjuan jorge.sanjuan at codethink.co.uk
Tue Dec 19 10:14:07 CET 2017


Make bmaControls be a flex array insted of a fixed size array so it
can have a variable length.

Signed-off-by: Jorge Sanjuan <jorge.sanjuan at codethink.co.uk>
---
 include/linux/usb/audio-v3.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/usb/audio-v3.h b/include/linux/usb/audio-v3.h
index cbbe51e309dd..68f651e8d11a 100644
--- a/include/linux/usb/audio-v3.h
+++ b/include/linux/usb/audio-v3.h
@@ -176,7 +176,7 @@ struct uac3_feature_unit_descriptor {
 	__u8 bSourceID;
 	/* bmaControls is actually u32,
 	 * but u8 is needed for the hybrid parser */
-	__u8 bmaControls[0]; /* variable length */
+	__u8 bmaControls[]; /* variable length */
 	/* wFeatureDescrStr omitted */
 } __attribute__((packed));
 
-- 
2.11.0



More information about the Alsa-devel mailing list