video: fbdev: sis: sis_main.c: Cleaning up missing null-terminate in conjunction with strncpy
Replacing strncpy with strlcpy to avoid strings that lacks null terminate. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
Родитель
66b330992c
Коммит
b232e94d28
|
@ -5830,7 +5830,7 @@ static int sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
ivideo->cardnumber++;
|
||||
}
|
||||
|
||||
strncpy(ivideo->myid, chipinfo->chip_name, 30);
|
||||
strlcpy(ivideo->myid, chipinfo->chip_name, sizeof(ivideo->myid));
|
||||
|
||||
ivideo->warncount = 0;
|
||||
ivideo->chip_id = pdev->device;
|
||||
|
|
Загрузка…
Ссылка в новой задаче