From 7b3fa14231d8f16bcdf119d314b0e03f4339aaf8 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 6 Jun 2021 22:40:08 -0600 Subject: [PATCH] fix compiler warning (entirely justified) about use of strncpy() --- libs/ardour/ladspa_plugin.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc index 5c19f0cfff..186ff13277 100644 --- a/libs/ardour/ladspa_plugin.cc +++ b/libs/ardour/ladspa_plugin.cc @@ -793,10 +793,10 @@ lrdf_remove_preset (const char* /*source*/, const char *setting_uri) lrdf_statement p; lrdf_statement *q; lrdf_statement *i; - char setting_uri_copy[64]; + char setting_uri_copy[65]; char buf[64]; - strncpy(setting_uri_copy, setting_uri, sizeof(setting_uri_copy)); + strncpy(setting_uri_copy, setting_uri, sizeof(setting_uri_copy) - 1); p.subject = setting_uri_copy; strncpy(buf, LADSPA_BASE "hasPortValue", sizeof(buf));