summary refs log tree commit diff stats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sysinfo/unix/pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/sysinfo/unix/pci.c b/plugins/sysinfo/unix/pci.c
index 10addf6f..528afd97 100644
--- a/plugins/sysinfo/unix/pci.c
+++ b/plugins/sysinfo/unix/pci.c
@@ -142,7 +142,7 @@ void pci_find_fullname(char *fullname, char *vendor, char *device)
 		{
 			position = strstr(buffer, vendor);
 			position += 6;
-			strncpy(vendorname, position, bsize/2);
+			g_strlcpy(vendorname, position, sizeof (vendorname));
 			position = strstr(vendorname, "\n");
 			*(position) = '\0';
 			break;
@@ -154,7 +154,7 @@ void pci_find_fullname(char *fullname, char *vendor, char *device)
 		{
 			position = strstr(buffer, device);
 			position += 6;
-			strncpy(devicename, position, bsize/2);
+			g_strlcpy(devicename, position, sizeof (devicename));
 			position = strstr(devicename, " (");
 			if (position == NULL)
 				position = strstr(devicename, "\n");