Commit 9bead1b5 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'array-bounds-fixes-5.14-rc3' of...

Merge tag 'array-bounds-fixes-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux

Pull array bounds warning fix from Gustavo Silva:
 "Fix a couple of out-of-bounds warnings in the media subsystem.

  This is part of the ongoing efforts to globally enable -Warray-bounds"

* tag 'array-bounds-fixes-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux:
  media: ngene: Fix out-of-bounds bug in ngene_command_config_free_buf()
parents 9f42f674 8d4abca9
...@@ -385,7 +385,7 @@ static int ngene_command_config_free_buf(struct ngene *dev, u8 *config) ...@@ -385,7 +385,7 @@ static int ngene_command_config_free_buf(struct ngene *dev, u8 *config)
com.cmd.hdr.Opcode = CMD_CONFIGURE_FREE_BUFFER; com.cmd.hdr.Opcode = CMD_CONFIGURE_FREE_BUFFER;
com.cmd.hdr.Length = 6; com.cmd.hdr.Length = 6;
memcpy(&com.cmd.ConfigureBuffers.config, config, 6); memcpy(&com.cmd.ConfigureFreeBuffers.config, config, 6);
com.in_len = 6; com.in_len = 6;
com.out_len = 0; com.out_len = 0;
......
...@@ -407,12 +407,14 @@ enum _BUFFER_CONFIGS { ...@@ -407,12 +407,14 @@ enum _BUFFER_CONFIGS {
struct FW_CONFIGURE_FREE_BUFFERS { struct FW_CONFIGURE_FREE_BUFFERS {
struct FW_HEADER hdr; struct FW_HEADER hdr;
struct {
u8 UVI1_BufferLength; u8 UVI1_BufferLength;
u8 UVI2_BufferLength; u8 UVI2_BufferLength;
u8 TVO_BufferLength; u8 TVO_BufferLength;
u8 AUD1_BufferLength; u8 AUD1_BufferLength;
u8 AUD2_BufferLength; u8 AUD2_BufferLength;
u8 TVA_BufferLength; u8 TVA_BufferLength;
} __packed config;
} __attribute__ ((__packed__)); } __attribute__ ((__packed__));
struct FW_CONFIGURE_UART { struct FW_CONFIGURE_UART {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment