diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-04-07 15:39:23 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-04-08 16:00:52 +0200 |
commit | 9b2c06a4f91ce23141c58fbecb064235c06d699f (patch) | |
tree | f7e634b9aea052cefae6d1ca65cf4965473a2e71 /drivers/media | |
parent | [media] v4l: ti-vpe: retain v4l2_buffer flags for captured buffers (diff) | |
download | linux-9b2c06a4f91ce23141c58fbecb064235c06d699f.tar.xz 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) |