mirror of
https://github.com/openwrt/openwrt.git
synced 2025-03-13 15:56:55 +00:00
Commit 7bc487c12eef ("kernel: ltq-vdsl-vr9-mei: fix warning about field-spanning write") patched the driver to use unsafe_memcpy in MEI_IoctlCmdMsgWrite. However, this is not actually necessary. The assignment of the variable "pDestPtr" can be modified so that the compiler knows about the correct size. This way, the check in the fortified memcpy works correctly. While at it, also adjust all places where similar code is used to copy from a CMV_STD_MESSAGE_T struct. Also mark all related structs as packed, because the code (and the driver in general) seems to rely on that anyway. Signed-off-by: Jan Hoffmann <jan@3e8.eu> Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250206225444.2521817-2-jan@3e8.eu/ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>