summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2023-06-29 14:09:43 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2023-06-29 14:09:43 +0000
commit2d23746f9661c908c1494066d6957b281f6450f6 (patch)
tree61d5c726cbfb1d69f0147638cb7fd3368a5d851a /usr.sbin
parent2665c6aca8de5fa69169f7e8ae25ea7a5475622f (diff)
In rrdp_session_save() stop the loop over deltas once MAX_RRDP_DELTAS
have been processed. With and OK tb@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/rpki-client/repo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/rpki-client/repo.c b/usr.sbin/rpki-client/repo.c
index ecaefc400e5..e3d684fe132 100644
--- a/usr.sbin/rpki-client/repo.c
+++ b/usr.sbin/rpki-client/repo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: repo.c,v 1.48 2023/06/23 11:36:24 claudio Exp $ */
+/* $OpenBSD: repo.c,v 1.49 2023/06/29 14:09:42 claudio Exp $ */
/*
* Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org>
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
@@ -727,7 +727,7 @@ rrdp_session_save(unsigned int id, struct rrdp_session *state)
if (fprintf(f, "-\n") < 0)
goto fail;
}
- for (i = 0; state->deltas[i] != NULL; i++) {
+ for (i = 0; i < MAX_RRDP_DELTAS && state->deltas[i] != NULL; i++) {
if (fprintf(f, "%s\n", state->deltas[i]) < 0)
goto fail;
}