diff options
author | Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> | 2014-09-14 19:35:48 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-09-30 13:00:01 +0300 |
commit | b232e94d2842abb893ccb0a870a8d7a920f87df4 (patch) | |
tree | 9b3bebfe77e1f6b84f76cf27e95bd30df508bd94 /drivers/video | |
parent | 66b330992c088a3eecbb61eb568095a3919d5aba (diff) | |
download | op-kernel-dev-b232e94d2842abb893ccb0a870a8d7a920f87df4.zip op-kernel-dev-b232e94d2842abb893ccb0a870a8d7a920f87df4.tar.gz |
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.c | 2 |
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 3f12a2d..1f4c216 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; |