X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Ftarget_v5upgrade.c;fp=src%2Ftarget_v5upgrade.c;h=670efce8311b859faf5755380ca94a192b945dbc;hb=785a9683eab4982babc49eea51549bc858a4b862;hp=e7f0599809341013b55e4d4b5a8c64fb1e8713e2;hpb=6c48fcaf954ba620008a3af0d477a90c62305628;p=collectd.git diff --git a/src/target_v5upgrade.c b/src/target_v5upgrade.c index e7f05998..670efce8 100644 --- a/src/target_v5upgrade.c +++ b/src/target_v5upgrade.c @@ -68,15 +68,15 @@ static int v5_df (const data_set_t *ds, value_list_t *vl) /* {{{ */ v5_swap_instances (&new_vl); /* Change the type to "df_complex" */ - memcpy (new_vl.type, "df_complex", sizeof (new_vl.type)); + sstrncpy (new_vl.type, "df_complex", sizeof (new_vl.type)); /* Dispatch two new value lists instead of this one */ new_vl.values[0].gauge = vl->values[0].gauge; - memcpy (new_vl.type_instance, "used", sizeof (new_vl.type_instance)); + sstrncpy (new_vl.type_instance, "used", sizeof (new_vl.type_instance)); plugin_dispatch_values (&new_vl); new_vl.values[0].gauge = vl->values[1].gauge; - memcpy (new_vl.type_instance, "free", sizeof (new_vl.type_instance)); + sstrncpy (new_vl.type_instance, "free", sizeof (new_vl.type_instance)); plugin_dispatch_values (&new_vl); /* Abort processing */