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>
Dieser Commit ist enthalten in:
@@ -525,7 +525,7 @@ struct dvb_frontend *ts2020_attach(struct dvb_frontend *fe,
|
||||
pdata.attach_in_use = true;
|
||||
|
||||
memset(&board_info, 0, sizeof(board_info));
|
||||
strlcpy(board_info.type, "ts2020", I2C_NAME_SIZE);
|
||||
strscpy(board_info.type, "ts2020", I2C_NAME_SIZE);
|
||||
board_info.addr = config->tuner_address;
|
||||
board_info.platform_data = &pdata;
|
||||
client = i2c_new_device(i2c, &board_info);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren