diff options
author | lucas <lucas@cvs.openbsd.org> | 2024-11-05 18:58:36 +0000 |
---|---|---|
committer | lucas <lucas@cvs.openbsd.org> | 2024-11-05 18:58:36 +0000 |
commit | 80a6a180589321a8933ead88fa66f53793ffc19a (patch) | |
tree | f64adac968e7c9831831acfcb1676d89454c1290 /usr.sbin | |
parent | 23ce98f91a129d63a82968c407dda03d138aa218 (diff) |
Check for pfxsz, not the pointer
ok tb
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/rpki-client/spl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/rpki-client/spl.c b/usr.sbin/rpki-client/spl.c index a8f0b4a55da..93c2b5abc24 100644 --- a/usr.sbin/rpki-client/spl.c +++ b/usr.sbin/rpki-client/spl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spl.c,v 1.4 2024/11/05 18:09:16 tb Exp $ */ +/* $OpenBSD: spl.c,v 1.5 2024/11/05 18:58:35 lucas Exp $ */ /* * Copyright (c) 2024 Job Snijders <job@fastly.com> * Copyright (c) 2022 Theo Buehler <tb@openbsd.org> @@ -373,7 +373,7 @@ spl_read(struct ibuf *b) io_read_buf(b, &s->pfxsz, sizeof(s->pfxsz)); io_read_buf(b, &s->expires, sizeof(s->expires)); - if (s->pfxs > 0) { + if (s->pfxsz > 0) { if ((s->pfxs = calloc(s->pfxsz, sizeof(s->pfxs[0]))) == NULL) err(1, NULL); io_read_buf(b, s->pfxs, s->pfxsz * sizeof(s->pfxs[0])); |