diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-04-07 10:39:23 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-04-08 11:00:52 -0300 |
commit | 9b2c06a4f91ce23141c58fbecb064235c06d699f (patch) | |
tree | f7e634b9aea052cefae6d1ca65cf4965473a2e71 /drivers/media | |
parent | bbe24c6759b341ab2504318e50ccd5482f5e6002 (diff) | |
download | blackbird-op-linux-9b2c06a4f91ce23141c58fbecb064235c06d699f.tar.gz blackbird-op-linux-9b2c06a4f91ce23141c58fbecb064235c06d699f.zip |
[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/media')
-rw-r--r-- | drivers/media/usb/stk1160/stk1160-ac97.c | 2 |
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) |