mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
fbdev: s3fb: Use strscpy() to copy strings into arrays
Replacing strcpy() with strscpy() ensures that overflow of the target buffer cannot happen. Signed-off-by: David Laight <david.laight.linux@gmail.com> Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
parent
d8421e0938
commit
60786bff19
|
|
@ -1333,7 +1333,7 @@ static int s3_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
|||
vga_wcrt(par->state.vgabase, 0x38, cr38);
|
||||
vga_wcrt(par->state.vgabase, 0x39, cr39);
|
||||
|
||||
strcpy(info->fix.id, s3_names [par->chip]);
|
||||
strscpy(info->fix.id, s3_names[par->chip]);
|
||||
info->fix.mmio_start = 0;
|
||||
info->fix.mmio_len = 0;
|
||||
info->fix.type = FB_TYPE_PACKED_PIXELS;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user