]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] cast char *
authorEvan Hunt <each@isc.org>
Thu, 14 Sep 2017 05:03:56 +0000 (22:03 -0700)
committerEvan Hunt <each@isc.org>
Thu, 14 Sep 2017 05:03:56 +0000 (22:03 -0700)
lib/dns/zone.c

index 2936842bef953432dc05583f6ac5de321191997c..80c8035b907a99f4a10412d3ebcc9e97c760f902 100644 (file)
@@ -1388,7 +1388,7 @@ dns_zone_getdbtype(dns_zone_t *zone, char ***argv, isc_mem_t *mctx) {
                tmp2 = mem;
                tmp2 += (zone->db_argc + 1) * sizeof(char *);
                for (i = 0; i < zone->db_argc; i++) {
-                       remaining = (size_t)(mem - tmp2);
+                       remaining = size - (tmp2 - (char *) mem);
                        *tmp++ = tmp2;
                        strlcpy(tmp2, zone->db_argv[i], remaining);
                        tmp2 += strlen(tmp2) + 1;