aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-core/dvb_vb2.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-10 08:19:14 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-11 13:32:17 -0400
commitc0decac19da3906d9b66291e57b7759489e1170f (patch)
tree0eeb1f7d2c5464e0c87e0c788fd8fb581662c621 /drivers/media/dvb-core/dvb_vb2.c
parentmedia: MAINTAINERS: add entry for i.MX PXP media mem2mem driver (diff)
downloadlinux-dev-c0decac19da3906d9b66291e57b7759489e1170f.tar.xz
linux-dev-c0decac19da3906d9b66291e57b7759489e1170f.zip
media: use strscpy() instead of strlcpy()
The implementation of strscpy() is more robust and safer. That's now the recommended way to copy NUL terminated strings. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/dvb-core/dvb_vb2.c')
-rw-r--r--drivers/media/dvb-core/dvb_vb2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb-core/dvb_vb2.c b/drivers/media/dvb-core/dvb_vb2.c
index b811adf88afa..c90b1fd94735 100644
--- a/drivers/media/dvb-core/dvb_vb2.c
+++ b/drivers/media/dvb-core/dvb_vb2.c
@@ -194,7 +194,7 @@ int dvb_vb2_init(struct dvb_vb2_ctx *ctx, const char *name, int nonblocking)
spin_lock_init(&ctx->slock);
INIT_LIST_HEAD(&ctx->dvb_q);
- strlcpy(ctx->name, name, DVB_VB2_NAME_MAX);
+ strscpy(ctx->name, name, DVB_VB2_NAME_MAX);
ctx->nonblocking = nonblocking;
ctx->state = DVB_VB2_STATE_INIT;