diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-07-20 16:09:04 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2023-07-20 16:09:04 +0000 |
commit | 8c904eff93d7c038855f2c1cee8ea54bdb4dae52 (patch) | |
tree | f26f3058991135a633caf2818b3d38ee3a6aa094 /src/libs6dns/s6dns_hosts_aaaaa_string.c | |
parent | 05402aede9d952f9e561335dc9ba1dae0f8c6084 (diff) | |
download | s6-dns-8c904eff93d7c038855f2c1cee8ea54bdb4dae52.tar.xz |
More bigfuxes!
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libs6dns/s6dns_hosts_aaaaa_string.c')
-rw-r--r-- | src/libs6dns/s6dns_hosts_aaaaa_string.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs6dns/s6dns_hosts_aaaaa_string.c b/src/libs6dns/s6dns_hosts_aaaaa_string.c index f4b00f0..771261a 100644 --- a/src/libs6dns/s6dns_hosts_aaaaa_string.c +++ b/src/libs6dns/s6dns_hosts_aaaaa_string.c @@ -18,7 +18,7 @@ extern int s6dns_hosts_aaaaa_string_r (cdb const *c, char const *name, genalloc if (r <= 0) return r ; if (!genalloc_readyplus(ip46full, ga, r)) return -1 ; for (size_t i = 0 ; i < r ; i++) - ip46full_from_ip4(genalloc_s(ip46full, ga) + i, sa.s + (i << 2)) ; + ip46full_from_ip4(genalloc_s(ip46full, ga) + gabase + i, sa.s + (i << 2)) ; genalloc_setlen(ip46full, ga, gabase + r) ; sa.len = 0 ; r = s6dns_hosts_aaaa_string_r(c, name, &sa, isunq) ; @@ -27,7 +27,7 @@ extern int s6dns_hosts_aaaaa_string_r (cdb const *c, char const *name, genalloc { if (!genalloc_readyplus(ip46full, ga, r)) goto err ; for (size_t i = 0 ; i < r ; i++) - ip46full_from_ip6(genalloc_s(ip46full, ga) + i, sa.s + (i << 4)) ; + ip46full_from_ip6(genalloc_s(ip46full, ga) + genalloc_len(ip46full, ga) + i, sa.s + (i << 4)) ; genalloc_setlen(ip46full, ga, genalloc_len(ip46full, ga) + r) ; } stralloc_free(&sa) ; |