diff options
author | Maria Matejka <mq@ucw.cz> | 2019-08-14 12:29:04 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2020-05-01 15:19:12 +0200 |
commit | a1b61a271af40a9d6ef0837424ab2c98d29f1575 (patch) | |
tree | 7f12d374e2ee2efd04147b43a3281997d52f3787 /test | |
parent | d65a926a67749f8e8ffb6df9b3e2e123669b0656 (diff) |
IPv6 address parser: fail on incomplete addresses
Diffstat (limited to 'test')
-rw-r--r-- | test/birdtest.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 |