]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: pvrusb2: Use kmemdup_array instead of kmemdup for multiple allocation
authorShen Lichuan <shenlichuan@vivo.com>
Mon, 26 Aug 2024 03:46:38 +0000 (11:46 +0800)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 12 Oct 2024 14:28:24 +0000 (16:28 +0200)
commit4510319676bdf96da819599643809e5155ef3460
tree52082da6dd75e2963b6ccbdb7acd3b071545474d
parent953c03d8cb41d08fe6994f5d94c4393ac9da2f13
media: pvrusb2: Use kmemdup_array instead of kmemdup for multiple allocation

Let the kmemdup_array() take care about multiplication
and possible overflows.

Using kmemdup_array() is more appropriate and makes the code
easier to audit.

Signed-off-by: Shen Lichuan <shenlichuan@vivo.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/usb/pvrusb2/pvrusb2-io.c