From a1b61a271af40a9d6ef0837424ab2c98d29f1575 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Wed, 14 Aug 2019 12:29:04 +0200 Subject: IPv6 address parser: fail on incomplete addresses --- test/birdtest.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/birdtest.c') diff --git a/test/birdtest.c b/test/birdtest.c index a092446a..641fd3c7 100644 --- a/test/birdtest.c +++ b/test/birdtest.c @@ -495,7 +495,10 @@ void bt_fmt_ipa(char *buf, size_t size, const void *data) { const ip_addr *ip = data; - bsnprintf(buf, size, "%I", *ip); + if (data) + bsnprintf(buf, size, "%I", *ip); + else + bsnprintf(buf, size, "(null)"); } int -- cgit v1.2.3