From: Florian Forster Date: Wed, 15 Nov 2017 21:03:53 +0000 (+0100) Subject: ovs_events plugin: Replace strncpy() with sstrncpy(). X-Git-Tag: collectd-5.8.0~9^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=6130f4c3463d299e7c89032a9532641ee057e203;p=collectd.git ovs_events plugin: Replace strncpy() with sstrncpy(). CID: 179243 --- diff --git a/src/ovs_events.c b/src/ovs_events.c index afa11997..bf457fdb 100644 --- a/src/ovs_events.c +++ b/src/ovs_events.c @@ -253,8 +253,8 @@ static int ovs_events_plugin_config(oconfig_item_t *ci) { ovs_events_config_free(); return -1; } - strncpy(ovs_events_ctx.config.ovs_db_serv, service, - sizeof(ovs_events_ctx.config.ovs_db_serv)); + sstrncpy(ovs_events_ctx.config.ovs_db_serv, service, + sizeof(ovs_events_ctx.config.ovs_db_serv)); sfree(service); } else if (strcasecmp("Socket", child->key) == 0) { if (cf_util_get_string_buffer(