diff options
author | Francis Dupont <fdupont@isc.org> | 2022-11-03 17:29:34 +0100 |
---|---|---|
committer | Francis Dupont <fdupont@isc.org> | 2022-11-03 17:29:34 +0100 |
commit | 6fb9bb04a3898361bbe48748cafcbc8d3156d112 (patch) | |
tree | 96b696532e4e7a97fa8a14904a6cfb3607280cff | |
parent | [#2548] reordered unittests (diff) | |
download | kea-6fb9bb04a3898361bbe48748cafcbc8d3156d112.tar.xz kea-6fb9bb04a3898361bbe48748cafcbc8d3156d112.zip |
[#2625] Changed sprintf to snprintf
-rw-r--r-- | src/bin/dhcp4/tests/fqdn_unittest.cc | 2 | ||||
-rw-r--r-- | src/bin/dhcp6/tests/fqdn_unittest.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/dhcp4/tests/fqdn_unittest.cc b/src/bin/dhcp4/tests/fqdn_unittest.cc index e0284ac4b9..5bba4ed022 100644 --- a/src/bin/dhcp4/tests/fqdn_unittest.cc +++ b/src/bin/dhcp4/tests/fqdn_unittest.cc @@ -634,7 +634,7 @@ public: // Create the configuration and configure the server char config_buf[1024]; - sprintf(config_buf, config_template, mode); + snprintf(config_buf, 1024, config_template, mode); ASSERT_NO_THROW(configure(config_buf, *srv_)) << "configuration failed"; // Build our client packet diff --git a/src/bin/dhcp6/tests/fqdn_unittest.cc b/src/bin/dhcp6/tests/fqdn_unittest.cc index e3757df635..6c8419dd83 100644 --- a/src/bin/dhcp6/tests/fqdn_unittest.cc +++ b/src/bin/dhcp6/tests/fqdn_unittest.cc @@ -439,7 +439,7 @@ public: // Create the configuration and configure the server char config_buf[1024]; - sprintf(config_buf, config_template, mode); + snprintf(config_buf, 1024, config_template, mode); configure(config_buf, *srv_); // Build our client packet |