]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix DNSRPS errors
authorEvan Hunt <each@isc.org>
Tue, 20 Aug 2024 20:09:20 +0000 (13:09 -0700)
committerOndřej Surý <ondrej@isc.org>
Wed, 18 Sep 2024 15:24:13 +0000 (17:24 +0200)
silence some reported snprintf() overrun warnings that prevented
DNSRPS from building on some platforms.

lib/dns/include/dns/librpz.h

index 662545670b886933cf2254ee6b3e194d6c173a81..3d05d271e15a0ec6c6c78a464348acb776d596b6 100644 (file)
@@ -871,8 +871,9 @@ librpz_lib_open(librpz_emsg_t *emsg, uv_lib_t *lib, const char *path) {
                if (errmsg == NULL) {
                        errmsg = "unknown error";
                }
-               snprintf(emsg->c, sizeof(librpz_emsg_t), "uv_dlopen(%s): %s",
-                        path, errmsg);
+               snprintf(emsg->c, sizeof(librpz_emsg_t),
+                        "uv_dlopen(%s): ", path);
+               strlcat(emsg->c, errmsg, sizeof(librpz_emsg_t));
                uv_dlclose(lib);
                return (NULL);
        }
@@ -884,7 +885,8 @@ librpz_lib_open(librpz_emsg_t *emsg, uv_lib_t *lib, const char *path) {
                }
                uv_dlclose(lib);
                snprintf(emsg->c, sizeof(librpz_emsg_t),
-                        "dlsym(%s, " LIBRPZ_DEF_STR "): %s", path, errmsg);
+                        "dlsym(%s, " LIBRPZ_DEF_STR "): ", path);
+               strlcat(emsg->c, errmsg, sizeof(librpz_emsg_t));
                return (NULL);
        }