- strcpy (vl.host, hostname_g);
- strcpy (vl.plugin, "myplugin");
+ sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+ sstrncpy (vl.plugin, "myplugin", sizeof (vl.plugin));
+
+ /* it is strongly recommended to use a type defined in the types.db file
+ * instead of a custom type */
+ sstrncpy (vl.type, "myplugin", sizeof (vl.plugin));