Skip to content

Commit 103cd1c

Browse files
committed
common: fix bad formatting for DNS-type wireaddr.
Found by @Chand-ra fuzzing test! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent 0d93db7 commit 103cd1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/wireaddr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ char *fmt_wireaddr_without_port(const tal_t * ctx, const struct wireaddr *a)
262262
return tal_fmt(ctx, "%s.onion",
263263
b32_encode(tmpctx, a->addr, a->addrlen));
264264
case ADDR_TYPE_DNS:
265-
return tal_fmt(ctx, "%s", a->addr);
265+
return tal_fmt(ctx, "%.*s", a->addrlen, a->addr);
266266
}
267267

268268
hex = tal_hexstr(ctx, a->addr, a->addrlen);

0 commit comments

Comments
 (0)