Merge "ASoC: msm: Modify buf size check to prevent OOB error"

This commit is contained in:
Linux Build Service Account 2018-05-24 02:46:46 -07:00 committed by Gerrit - the friendly Code Review server
commit 45c4f7d22f

View file

@ -339,7 +339,7 @@ static ssize_t audio_output_latency_dbgfs_write(struct file *file,
{ {
char *temp; char *temp;
if (count > 2*sizeof(char)) { if (count != 2*sizeof(char)) {
pr_err("%s: err count is more %zd\n", __func__, count); pr_err("%s: err count is more %zd\n", __func__, count);
return -EINVAL; return -EINVAL;
} else { } else {
@ -396,7 +396,7 @@ static ssize_t audio_input_latency_dbgfs_write(struct file *file,
{ {
char *temp; char *temp;
if (count > 2*sizeof(char)) { if (count != 2*sizeof(char)) {
pr_err("%s: err count is more %zd\n", __func__, count); pr_err("%s: err count is more %zd\n", __func__, count);
return -EINVAL; return -EINVAL;
} else { } else {