diff options
author | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-09-10 14:19:14 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-09-11 19:32:17 +0200 |
commit | c0decac19da3906d9b66291e57b7759489e1170f (patch) | |
tree | 0eeb1f7d2c5464e0c87e0c788fd8fb581662c621 /drivers/media/usb/dvb-usb/technisat-usb2.c | |
parent | media: MAINTAINERS: add entry for i.MX PXP media mem2mem driver (diff) | |
download | linux-c0decac19da3906d9b66291e57b7759489e1170f.tar.xz linux-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/usb/dvb-usb/technisat-usb2.c')
-rw-r--r-- | drivers/media/usb/dvb-usb/technisat-usb2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/usb/dvb-usb/technisat-usb2.c b/drivers/media/usb/dvb-usb/technisat-usb2.c index 18d0f8f5283f..c659e18b358b 100644 --- a/drivers/media/usb/dvb-usb/technisat-usb2.c +++ b/drivers/media/usb/dvb-usb/technisat-usb2.c @@ -566,8 +566,9 @@ static int technisat_usb2_frontend_attach(struct dvb_usb_adapter *a) a->fe_adap[0].fe->ops.set_voltage = technisat_usb2_set_voltage; /* if everything was successful assign a nice name to the frontend */ - strlcpy(a->fe_adap[0].fe->ops.info.name, a->dev->desc->name, - sizeof(a->fe_adap[0].fe->ops.info.name)); + strscpy(a->fe_adap[0].fe->ops.info.name, + a->dev->desc->name, + sizeof(a->fe_adap[0].fe->ops.info.name)); } else { dvb_frontend_detach(a->fe_adap[0].fe); a->fe_adap[0].fe = NULL; |