linux/sound/core/oss
Gustavo A. R. Silva 92bfa664ae ALSA: pcm: oss: Use struct_size() helper
Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes, in particular in the
context in which this code is being used.

So, replace the following form:

sizeof(struct rate_priv) + src_format->channels * sizeof(struct rate_channel)

with:

struct_size(data, channels, src_format->channels)

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-05-24 07:59:19 +02:00
..
copy.c
io.c ALSA: pcm: Build OSS writev/readv helpers conditionally 2017-06-02 19:38:26 +02:00
linear.c
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mixer_oss.c ALSA: core: Don't refer to snd_cards array directly 2019-04-17 07:16:15 +02:00
mulaw.c
pcm_oss.c ALSA: pcm: Fix possible OOB access in PCM oss plugins 2019-03-22 16:27:03 +01:00
pcm_plugin.c ALSA: oss: Use kvzalloc() for local buffer allocations 2018-11-09 14:12:04 +01:00
pcm_plugin.h ALSA: pcm: Build OSS writev/readv helpers conditionally 2017-06-02 19:38:26 +02:00
rate.c ALSA: pcm: oss: Use struct_size() helper 2019-05-24 07:59:19 +02:00
route.c