mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-16 22:10:24 +00:00
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>
This commit is contained in:
parent
a5448c88b8
commit
77eca3cd46
@ -146,7 +146,7 @@ struct pm860x_priv {
|
||||
struct pm860x_det det;
|
||||
|
||||
int irq[4];
|
||||
unsigned char name[4][MAX_NAME_LEN];
|
||||
unsigned char name[4][MAX_NAME_LEN+1];
|
||||
};
|
||||
|
||||
/* -9450dB to 0dB in 150dB steps ( mute instead of -9450dB) */
|
||||
|
Loading…
Reference in New Issue
Block a user