summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-04-07 17:39:23 +0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-04-08 18:00:52 +0400
commit9b2c06a4f91ce23141c58fbecb064235c06d699f (patch)
treef7e634b9aea052cefae6d1ca65cf4965473a2e71 /drivers
parentbbe24c6759b341ab2504318e50ccd5482f5e6002 (diff)
downloadlinux-9b2c06a4f91ce23141c58fbecb064235c06d699f.tar.xz
[media] stk1160: warrant a NUL terminated string
strncpy() doesn't warrant a NUL terminated string. Use strlcpy() instead. Fixes Coverity bug CID#1195195. Acked-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/usb/stk1160/stk1160-ac97.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/stk1160/stk1160-ac97.c b/drivers/media/usb/stk1160/stk1160-ac97.c
index c46c8be89602..2dd308f9541f 100644
--- a/drivers/media/usb/stk1160/stk1160-ac97.c
+++ b/drivers/media/usb/stk1160/stk1160-ac97.c
@@ -108,7 +108,7 @@ int stk1160_ac97_register(struct stk1160 *dev)
"stk1160-mixer");
snprintf(card->longname, sizeof(card->longname),
"stk1160 ac97 codec mixer control");
- strncpy(card->driver, dev->dev->driver->name, sizeof(card->driver));
+ strlcpy(card->driver, dev->dev->driver->name, sizeof(card->driver));
rc = snd_ac97_bus(card, 0, &stk1160_ac97_ops, NULL, &ac97_bus);
if (rc)