summaryrefslogtreecommitdiff
path: root/usr.sbin/rpki-client/tal.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/rpki-client/tal.c')
-rw-r--r--usr.sbin/rpki-client/tal.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/rpki-client/tal.c b/usr.sbin/rpki-client/tal.c
index dc2077dd866..f3db5d4f2eb 100644
--- a/usr.sbin/rpki-client/tal.c
+++ b/usr.sbin/rpki-client/tal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tal.c,v 1.24 2020/12/03 15:02:12 claudio Exp $ */
+/* $OpenBSD: tal.c,v 1.25 2020/12/21 11:35:55 claudio Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -330,14 +330,17 @@ tal_read(int fd)
io_buf_read_alloc(fd, (void **)&p->pkey, &p->pkeysz);
assert(p->pkeysz > 0);
io_str_read(fd, &p->descr);
+ assert(p->descr);
io_simple_read(fd, &p->urisz, sizeof(size_t));
assert(p->urisz > 0);
if ((p->uri = calloc(p->urisz, sizeof(char *))) == NULL)
err(1, NULL);
- for (i = 0; i < p->urisz; i++)
+ for (i = 0; i < p->urisz; i++) {
io_str_read(fd, &p->uri[i]);
+ assert(p->uri[i]);
+ }
return p;
}