|
@@ -1,4 +1,4 @@
|
|
|
-/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
|
|
|
+/* Copyright (c) 2017-2018, 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
|
|
@@ -539,8 +539,8 @@ static int msm_transcode_stream_cmd_put(struct snd_kcontrol *kcontrol,
|
|
|
goto done;
|
|
|
}
|
|
|
|
|
|
- if ((sizeof(struct msm_adsp_event_data) + event_data->payload_len) >=
|
|
|
- sizeof(ucontrol->value.bytes.data)) {
|
|
|
+ if (event_data->payload_len > sizeof(ucontrol->value.bytes.data)
|
|
|
+ - sizeof(struct msm_adsp_event_data)) {
|
|
|
pr_err("%s param length=%d exceeds limit",
|
|
|
__func__, event_data->payload_len);
|
|
|
ret = -EINVAL;
|