} /* void network_send_buffer */
static int add_to_buffer (char *buffer, int buffer_size,
- value_list_t *vl_def, char *type_def,
+ value_list_t *vl_def, char *type_def, size_t type_def_size,
const data_set_t *ds, const value_list_t *vl)
{
char *buffer_orig = buffer;
if (write_part_string (&buffer, &buffer_size, TYPE_TYPE,
ds->type, strlen (ds->type)) != 0)
return (-1);
- sstrncpy (type_def, ds->type, sizeof (type_def));
+ sstrncpy (type_def, ds->type, type_def_size);
}
if (strcmp (vl_def->type_instance, vl->type_instance) != 0)
status = add_to_buffer (send_buffer_ptr,
sizeof (send_buffer) - send_buffer_fill,
- &send_buffer_vl, send_buffer_type,
+ &send_buffer_vl,
+ send_buffer_type, sizeof (send_buffer_type),
ds, vl);
if (status >= 0)
{
status = add_to_buffer (send_buffer_ptr,
sizeof (send_buffer) - send_buffer_fill,
- &send_buffer_vl, send_buffer_type,
+ &send_buffer_vl,
+ send_buffer_type, sizeof (send_buffer_type),
ds, vl);
if (status >= 0)