Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: tipc: resize nlattr array to correct size
According to nla_parse_nested_deprecated(), the tb[] is supposed to the destination array with maxtype+1 elements. In current tipc_nl_media_get() and __tipc_nl_media_set(), a larger array is used which is unnecessary. This patch resize them to a proper size. Fixes: 1e55417 ("tipc: add media set to new netlink api") Fixes: 46f15c6 ("tipc: add media get/dump to new netlink api") Signed-off-by: Lin Ma <[email protected]> Reviewed-by: Florian Westphal <[email protected]> Reviewed-by: Tung Nguyen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
- Loading branch information