KSPP / linux

Linux kernel source tree (Kernel Self Protection Project)
https://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project
Other
80 stars 5 forks source link

Replace one-element arrays in sound/pci/mixart/mixart_core.h #296

Closed GustavoARSilva closed 5 months ago

GustavoARSilva commented 1 year ago

diff -u -p a/sound/pci/mixart/mixart_core.h b/sound/pci/mixart/mixart_core.h
--- a/sound/pci/mixart/mixart_core.h
+++ b/sound/pci/mixart/mixart_core.h
@@ -231,7 +231,7 @@ struct mixart_group_state_req
        u64           scheduler;
        u32           reserved4np[2];
        u32           pipe_count;    /* set to 1 for instance */
-       struct mixart_uid  pipe_uid[1];   /* could be an array[pipe_count] */
+       struct mixart_uid pipe_uid[];   /* could be an array[pipe_count] */
 } __attribute__((packed));

 struct mixart_group_state_resp
@@ -314,7 +314,7 @@ struct mixart_clock_properties
        u32 format;
        u32 board_mask;
        u32 nb_callers; /* set to 1 (see below) */
-       struct mixart_uid uid_caller[1];
+       struct mixart_uid uid_caller[];
 } __attribute__((packed));

 struct mixart_clock_properties_resp
@@ -401,7 +401,7 @@ struct mixart_stream_param_desc
        u32 reserved4np[3];
        u32 pipe_count;                           /* set to 1 (array size !) */
        u32 stream_count;                         /* set to 1 (array size !) */
-       struct mixart_txx_stream_desc stream_desc[1];  /* only one stream per command, but this could be an array */
+       struct mixart_txx_stream_desc stream_desc[];  /* only one stream per command, but this could be an array */

 } __attribute__((packed));
kees commented 5 months ago

Fixed in commit 4040fc51ca37b198bb43f716e1868fe7ff5d731c.