mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
bt: realtek: Fix potential buffer overflow in cfg_list_item struct
The `cfg_list_item` struct previously defined the `data` array with a zero-length, which can lead to buffer overflow issues detected by the `fortify_memcpy_chk` function. So change the zero-length array to a flexible array length. Bug 4701669 Change-Id: I3c4575efbab681fa8b6039793c410b23c4179106 Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3159595 GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
00e9f705d4
commit
6f80c397ed
@@ -54,7 +54,7 @@ struct cfg_list_item {
|
|||||||
struct list_head list;
|
struct list_head list;
|
||||||
u16 offset;
|
u16 offset;
|
||||||
u8 len;
|
u8 len;
|
||||||
u8 data[0];
|
u8 data[];
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct list_head list_configs;
|
static struct list_head list_configs;
|
||||||
|
|||||||
Reference in New Issue
Block a user