diff options
| author | Michael Bestas <mkbestas@lineageos.org> | 2020-08-23 00:15:55 +0300 |
|---|---|---|
| committer | Michael Bestas <mkbestas@lineageos.org> | 2020-08-23 00:16:03 +0300 |
| commit | 81d0e1715dc7ad78d029cfafc6810bbb90281247 (patch) | |
| tree | fc19cd53c8d0c7d991271b1e5b000a84fc6be0a3 /sound/soc/codecs | |
| parent | edc3d5eb61070a99aee8dac974428e7c5ce57be2 (diff) | |
Revert "ASoC: wsa881x: Fix buffer overflow in wsa881x_swrslave_reg_show"
* We'll take the upstream fix
This reverts commit 8099b2c2cec5fc8750c9bd63e178d389b8cb45cb.
Change-Id: I3a1ca9684de0d12d62ad05e10ff6952edb66876a
Diffstat (limited to 'sound/soc/codecs')
| -rw-r--r-- | sound/soc/codecs/wsa881x.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/wsa881x.c b/sound/soc/codecs/wsa881x.c index 44ae263ba4d1..0c672fd89652 100644 --- a/sound/soc/codecs/wsa881x.c +++ b/sound/soc/codecs/wsa881x.c @@ -362,8 +362,8 @@ static ssize_t wsa881x_swrslave_reg_show(char __user *ubuf, size_t count, continue; swr_read(dbgwsa881x->swr_slave, devnum, i, ®_val, 1); - len = snprintf(tmp_buf, sizeof(tmp_buf), "0x%.3x: 0x%.2x\n", - i, (reg_val & 0xFF)); + len = snprintf(tmp_buf, 25, "0x%.3x: 0x%.2x\n", i, + (reg_val & 0xFF)); if ((total + len) >= count - 1) break; if (copy_to_user((ubuf + total), tmp_buf, len)) { |
