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:
@@ -638,7 +638,7 @@ static int anysee_add_i2c_dev(struct dvb_usb_device *d, const char *type,
|
||||
.platform_data = platform_data,
|
||||
};
|
||||
|
||||
strlcpy(board_info.type, type, I2C_NAME_SIZE);
|
||||
strscpy(board_info.type, type, I2C_NAME_SIZE);
|
||||
|
||||
/* find first free client */
|
||||
for (num = 0; num < ANYSEE_I2C_CLIENT_MAX; num++) {
|
||||
|
Reference in New Issue
Block a user