Commit 136d9f3a authored by Chen Gang's avatar Chen Gang Committed by Mauro Carvalho Chehab

[media] go7007: using strlcpy instead of strncpy

For NUL terminated string, need always set '\0' in the end.
Signed-off-by: default avatarChen Gang <gang.chen@asianux.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 70f31c91
...@@ -466,7 +466,7 @@ static int saa7134_go7007_init(struct saa7134_dev *dev) ...@@ -466,7 +466,7 @@ static int saa7134_go7007_init(struct saa7134_dev *dev)
go->board_id = GO7007_BOARDID_PCI_VOYAGER; go->board_id = GO7007_BOARDID_PCI_VOYAGER;
snprintf(go->bus_info, sizeof(go->bus_info), "PCI:%s", pci_name(dev->pci)); snprintf(go->bus_info, sizeof(go->bus_info), "PCI:%s", pci_name(dev->pci));
strncpy(go->name, saa7134_boards[dev->board].name, sizeof(go->name)); strlcpy(go->name, saa7134_boards[dev->board].name, sizeof(go->name));
go->hpi_ops = &saa7134_go7007_hpi_ops; go->hpi_ops = &saa7134_go7007_hpi_ops;
go->hpi_context = saa; go->hpi_context = saa;
saa->dev = dev; saa->dev = dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment