diff options
author | Daniel Mack <daniel@zonque.org> | 2014-10-07 07:41:25 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-10-07 08:13:22 -0400 |
commit | 77eca3cd461da663945eceddf454466a609d8ca4 (patch) | |
tree | 6a784c3d1d6285e4ea9f98d521bede20562b138d /sound/soc | |
parent | a5448c88b812390a3622e76d774e10c0da1fb970 (diff) |
ASoC: 88pm860x-codec: Fix possibly missing string termination
Coverity spotted an issue with strncpy() in pm860x_codec_probe()
which does not take the \0 termination byte into account. Fix this
by making the buffers one byte larger so the can really accommodate
MAX_NAME_LEN bytes long strings.
Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/88pm860x-codec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c index 4c3b0af39fd8..e88a6b67f781 100644 --- a/sound/soc/codecs/88pm860x-codec.c +++ b/sound/soc/codecs/88pm860x-codec.c | |||
@@ -146,7 +146,7 @@ struct pm860x_priv { | |||
146 | struct pm860x_det det; | 146 | struct pm860x_det det; |
147 | 147 | ||
148 | int irq[4]; | 148 | int irq[4]; |
149 | unsigned char name[4][MAX_NAME_LEN]; | 149 | unsigned char name[4][MAX_NAME_LEN+1]; |
150 | }; | 150 | }; |
151 | 151 | ||
152 | /* -9450dB to 0dB in 150dB steps ( mute instead of -9450dB) */ | 152 | /* -9450dB to 0dB in 150dB steps ( mute instead of -9450dB) */ |