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>
This commit is contained in:
@@ -149,7 +149,7 @@ static int cs53l32a_probe(struct i2c_client *client,
|
||||
return -EIO;
|
||||
|
||||
if (!id)
|
||||
strlcpy(client->name, "cs53l32a", sizeof(client->name));
|
||||
strscpy(client->name, "cs53l32a", sizeof(client->name));
|
||||
|
||||
v4l_info(client, "chip found @ 0x%x (%s)\n",
|
||||
client->addr << 1, client->adapter->name);
|
||||
|
Viittaa uudesa ongelmassa
Block a user