ASoC: soc-core: Replace use of strncpy() with strlcpy()
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>
Mon, 6 Dec 2010 15:42:17 +0000 (15:42 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 6 Dec 2010 19:15:03 +0000 (19:15 +0000)
commit58818a77cd415e2f76607749de5a1ff24e58cefe
tree5634326deef453af237559346ac7a7214d7ee2b9
parent589c3563f6476950f26b5bcc9beb1b39a7bcc644
ASoC: soc-core: Replace use of strncpy() with strlcpy()

By using strncpy() if the source string does not have a null byte in the
first n bytes, then the destination string is not null-terminated.
This can be fixed in a two-step process by manually null-terminating the
array after the use of strncpy() or by using strlcpy().

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-core.c