summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorZidan Wang <zidan.wang@freescale.com>2015-11-27 13:42:41 +0800
committerNitin Garg <nitin.garg@nxp.com>2016-01-14 11:02:29 -0600
commit482009ecdcd0efd47fa645c03677f3101c514a13 (patch)
treedc03f4d09afe4415c0f8fc7c599597c4f4aadddd /sound
parentc0bc7f8b38bab74313e402cf9a79e6c09e22a534 (diff)
MLK-11915-10 ASoC: imx_mqs: fix mqs_priv->name overrun issue
fix mqs_priv->name overrun issue. Reported by Coverity. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> (cherry picked from commit ef1c59f93981b15412a0207d5517a26901bb2ecd)
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/fsl_mqs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/fsl_mqs.c b/sound/soc/codecs/fsl_mqs.c
index 834979db310d..a8725fba6e99 100644
--- a/sound/soc/codecs/fsl_mqs.c
+++ b/sound/soc/codecs/fsl_mqs.c
@@ -163,7 +163,7 @@ static int fsl_mqs_probe(struct platform_device *pdev)
return -ENOMEM;
mqs_priv->pdev = pdev;
- strcpy(mqs_priv->name, np->name);
+ strncpy(mqs_priv->name, np->name, sizeof(mqs_priv->name) - 1);
gpr_np = of_parse_phandle(np, "gpr", 0);
if (IS_ERR(gpr_np)) {