lkml.org 
[lkml]   [2022]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2][next] ALSA: usb-audio: scarlett2: Use struct_size() helper in scarlett2_usb()
On Thu, 20 Jan 2022 22:16:00 +0100,
Gustavo A. R. Silva wrote:
>
> Make use of the struct_size() helper instead of an open-coded version,
> in order to avoid any potential type mistakes or integer overflows that,
> in the worst scenario, could lead to heap overflows.
>
> Also, address the following sparse warnings:
> sound/usb/mixer_scarlett_gen2.c:1064:28: warning: using sizeof on a flexible structure
> sound/usb/mixer_scarlett_gen2.c:1065:29: warning: using sizeof on a flexible structure
>
> Link: https://github.com/KSPP/linux/issues/174
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> ---
> Changes in v2:
> - Use correct format specifier %zu for type size_t argument.

Applied now. Thanks.


Takashi

\
 
 \ /
  Last update: 2022-01-25 15:18    [W:0.074 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site