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)
This commit is contained in:
committed by
Leonard Crestez
parent
427d9d92c0
commit
7e4cd40df5
@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user