diff options
author | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-09-10 08:19:14 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-09-11 13:32:17 -0400 |
commit | c0decac19da3906d9b66291e57b7759489e1170f (patch) | |
tree | 0eeb1f7d2c5464e0c87e0c788fd8fb581662c621 /drivers/media/dvb-frontends/tc90522.c | |
parent | b730c40813a95ebc35757790a990794f55e2b61c (diff) | |
download | blackbird-op-linux-c0decac19da3906d9b66291e57b7759489e1170f.tar.gz blackbird-op-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/dvb-frontends/tc90522.c')
-rw-r--r-- | drivers/media/dvb-frontends/tc90522.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/tc90522.c b/drivers/media/dvb-frontends/tc90522.c index 2ad81a438d6a..849d63dbc279 100644 --- a/drivers/media/dvb-frontends/tc90522.c +++ b/drivers/media/dvb-frontends/tc90522.c @@ -781,7 +781,7 @@ static int tc90522_probe(struct i2c_client *client, adap->owner = THIS_MODULE; adap->algo = &tc90522_tuner_i2c_algo; adap->dev.parent = &client->dev; - strlcpy(adap->name, "tc90522_sub", sizeof(adap->name)); + strscpy(adap->name, "tc90522_sub", sizeof(adap->name)); i2c_set_adapdata(adap, state); ret = i2c_add_adapter(adap); if (ret < 0) |