diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2019-02-26 06:20:44 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-02-26 06:20:44 -0800 |
| commit | 93f561a9ef96f8c96778656cf25dbd8b5473f03d (patch) | |
| tree | 661450f921c40d4486bfb6470a912ea10a929871 | |
| parent | 8065726cc26b5c55c8ab68cb195002dbed4dfbf8 (diff) | |
| parent | 2bf0c5fb5ecfd8a0a5679326713edc7b56be780f (diff) | |
Merge "asoc: check payload length against structure size"
| -rw-r--r-- | sound/soc/msm/qdsp6v2/msm-qti-pp-config.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/soc/msm/qdsp6v2/msm-qti-pp-config.c b/sound/soc/msm/qdsp6v2/msm-qti-pp-config.c index 3dc49e719ccf..769eb9c9853d 100644 --- a/sound/soc/msm/qdsp6v2/msm-qti-pp-config.c +++ b/sound/soc/msm/qdsp6v2/msm-qti-pp-config.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1020,6 +1020,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 > |
