mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
Merge "asoc: check payload length against structure size"
This commit is contained in:
commit
4ef6a037b5
1 changed files with 8 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/err.h>
|
||||
|
|
@ -1172,6 +1172,13 @@ int msm_adsp_inform_mixer_ctl(struct snd_soc_pcm_runtime *rtd,
|
|||
}
|
||||
|
||||
event_data = (struct msm_adsp_event_data *)payload;
|
||||
if (event_data->payload_len < sizeof(struct msm_adsp_event_data)) {
|
||||
pr_err("%s: event_data size of %x is less than expected.\n",
|
||||
__func__, event_data->payload_len);
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
kctl->info(kctl, &kctl_info);
|
||||
|
||||
if (event_data->payload_len >
|
||||
|
|
|
|||
Loading…
Reference in a new issue