diff --git a/lib/slave_config.c b/lib/slave_config.c index 4ac132a9..132158df 100644 --- a/lib/slave_config.c +++ b/lib/slave_config.c @@ -875,7 +875,7 @@ int ecrt_slave_config_flag(ec_slave_config_t *sc, const char *key, return -ENOMEM; } - strcpy(io.key, key); + strcpy(io.key, key); // no strncpy, buffer is alloc'ed with strlen io.value = value; ret = ioctl(sc->master->fd, EC_IOCTL_SC_FLAG, &io); diff --git a/master/flag.c b/master/flag.c index 50512811..652d35b1 100644 --- a/master/flag.c +++ b/master/flag.c @@ -47,7 +47,7 @@ int ec_flag_init( return -ENOMEM; } - strcpy(flag->key, key); + strcpy(flag->key, key); // no strncpy, buffer is alloc'ed with strlen flag->value = value; return 0; }