DivestOS/Patches/Linux_CVEs/CVE-2017-0535/ANY/0001.patch

14 lines
382 B
Diff
Raw Normal View History

2017-10-29 22:14:37 -04:00
diff --git a/sound/soc/codecs/rt5506.c b/sound/soc/codecs/rt5506.c
index 74572c4..fbce69a 100644
--- a/sound/soc/codecs/rt5506.c
+++ b/sound/soc/codecs/rt5506.c
@@ -676,6 +676,8 @@
{
if (mode >= rt5506_cfg_data.mode_num)
return -EINVAL;
+ if (rt5506_cfg_data.cmd_data[mode].config.reg_len > MAX_REG_DATA)
+ return -EINVAL;
pr_info("%s: set mode %d\n", __func__, mode);