diff --git a/src/apcups.c b/src/apcups.c
index 5a03764f59f5ea53bc1ac63cd549f183d22e40d1..c948f5a165b8b5f14d298601de99c90a4cc045e2 100644 (file)
--- a/src/apcups.c
+++ b/src/apcups.c
vl.values = values;
vl.values_len = 1;
vl.time = time (NULL);
- strcpy (vl.host, hostname_g);
- strcpy (vl.plugin, "apcups");
- strcpy (vl.plugin_instance, "");
+ sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+ sstrncpy (vl.plugin, "apcups", sizeof (vl.plugin));
+ sstrncpy (vl.plugin_instance, "", sizeof (vl.plugin_instance));
strncpy (vl.type_instance, type_inst, sizeof (vl.type_instance));
plugin_dispatch_values (type, &vl);