summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>2014-09-14 19:35:48 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-09-30 13:00:01 +0300
commitb232e94d2842abb893ccb0a870a8d7a920f87df4 (patch)
tree9b3bebfe77e1f6b84f76cf27e95bd30df508bd94 /drivers/video
parent66b330992c088a3eecbb61eb568095a3919d5aba (diff)
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>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/sis/sis_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/sis/sis_main.c b/drivers/video/fbdev/sis/sis_main.c
index 3f12a2dd959a..1f4c216327f6 100644
--- a/drivers/video/fbdev/sis/sis_main.c
+++ b/drivers/video/fbdev/sis/sis_main.c
@@ -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;